NetKernel APIs


org.ten60.netkernel.layer1.nkf.impl
Class NKFResponseImpl

java.lang.Object
  extended byorg.ten60.netkernel.layer1.nkf.impl.NKFResponseImpl
All Implemented Interfaces:
INKFResponse

public class NKFResponseImpl
extends Object
implements INKFResponse

Wrapper around the setting of a response from the invocation of an accessor


Constructor Summary
NKFResponseImpl(IURAspect aAspect, NKFHelperImpl aHelper)
          Creates a new instance of NKFResponseImpl
NKFResponseImpl(IURRepresentation aRep, NKFHelperImpl aHelper)
          Creates a new instance of NKFResponseImpl
 
Method Summary
 void addAspect(IURAspect aAspect)
          Add an additional aspect into a response.
 void setCacheable()
          Declares that the response may have merit in being cached.
 void setCreationCost(int aCost)
          Sets the creation cost of this response over and above the accumulated cost of any subrequests, by default 0.
 void setExpired()
          Forces the response to be immediately expired so it and any derived results are uncacheable.
 void setExpiryPeriod(long aPeriod)
          Forces a specific expiry period (in milliseconds) on the response
 void setMimeType(String aType)
          Sets the mimetype of this response.
 void setNeverExpire()
          Forces the response to never expire so that an dependencies are ignored and the result will be valid forever
 void setUsageCost(int aCost)
          Sets the usage cost of this response over and above the accumulated cost of any subrequests, by default 0.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NKFResponseImpl

public NKFResponseImpl(IURRepresentation aRep,
                       NKFHelperImpl aHelper)
Creates a new instance of NKFResponseImpl


NKFResponseImpl

public NKFResponseImpl(IURAspect aAspect,
                       NKFHelperImpl aHelper)
Creates a new instance of NKFResponseImpl

Method Detail

setCacheable

public void setCacheable()
Description copied from interface: INKFResponse
Declares that the response may have merit in being cached. By default the results from accessors are declared to be intermediate and will not usually be cached.

Specified by:
setCacheable in interface INKFResponse

setCreationCost

public void setCreationCost(int aCost)
Description copied from interface: INKFResponse
Sets the creation cost of this response over and above the accumulated cost of any subrequests, by default 0.

Specified by:
setCreationCost in interface INKFResponse
Parameters:
aCost -

setExpired

public void setExpired()
Description copied from interface: INKFResponse
Forces the response to be immediately expired so it and any derived results are uncacheable. By default a response will inherit expiry from all subrequests which it was derived from.

Specified by:
setExpired in interface INKFResponse

setNeverExpire

public void setNeverExpire()
Description copied from interface: INKFResponse
Forces the response to never expire so that an dependencies are ignored and the result will be valid forever

Specified by:
setNeverExpire in interface INKFResponse

setExpiryPeriod

public void setExpiryPeriod(long aPeriod)
Description copied from interface: INKFResponse
Forces a specific expiry period (in milliseconds) on the response

Specified by:
setExpiryPeriod in interface INKFResponse
Parameters:
aPeriod - the number of milliseconds for which the response is valid

setMimeType

public void setMimeType(String aType)
Description copied from interface: INKFResponse
Sets the mimetype of this response. By default the mimetype will be "content/unknown" if created from an aspect, or it will inherit the mimetype of the representation that it was created from.

Specified by:
setMimeType in interface INKFResponse
Parameters:
aType -

setUsageCost

public void setUsageCost(int aCost)
Description copied from interface: INKFResponse
Sets the usage cost of this response over and above the accumulated cost of any subrequests, by default 0.

Specified by:
setUsageCost in interface INKFResponse
Parameters:
aCost -

addAspect

public void addAspect(IURAspect aAspect)
Description copied from interface: INKFResponse
Add an additional aspect into a response. This may be useful for transreptors which want to preserve aspects from the original representation

Specified by:
addAspect in interface INKFResponse

NetKernel APIs


Copyright © 2002-2004 1060 Research Ltd. All Rights Reserved.