NetKernel APIs


org.ten60.netkernel.layer1.nkf
Interface INKFResponse

All Known Implementing Classes:
NKFResponseImpl

public interface INKFResponse

The response to be issued as the result of the invocation of an accessor


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.
 

Method Detail

setCreationCost

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

Parameters:
aCost -

setUsageCost

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

Parameters:
aCost -

setMimeType

public void setMimeType(String aType)
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.

Parameters:
aType -

setExpired

public void setExpired()
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.


setNeverExpire

public void setNeverExpire()
Forces the response to never expire so that an dependencies are ignored and the result will be valid forever


setExpiryPeriod

public void setExpiryPeriod(long aPeriod)
Forces a specific expiry period (in milliseconds) on the response

Parameters:
aPeriod - the number of milliseconds for which the response is valid

setCacheable

public void setCacheable()
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.


addAspect

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


NetKernel APIs


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