|
NetKernel APIs |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ten60.netkernel.urii.representation.SimpleRepresentationImpl
com.ten60.netkernel.container.ComponentImpl
com.ten60.netkernel.cache.Cache
NetKernel Cache Component- responsible for locating a cachelet for getting or putting an IURRepresentation from an URRequest.
Field Summary | |
static IURRepresentation |
EXPIRED_RESOURCE
expired resource in cache |
static URIdentifier |
URI
our static URI |
Fields inherited from class com.ten60.netkernel.urii.representation.SimpleRepresentationImpl |
mMeta |
Constructor Summary | |
Cache()
Creates a new instance of Cache |
Method Summary | |
IURRepresentation |
get(URRequest aRequest)
public interface for getting a IURRepresentation that will satisfy the given request |
void |
put(URResult aResult)
public interface for putting informing the cache of a result- it is its choice whether to use it or not |
void |
registerCacheletModule(ModuleDefinition aModule)
|
void |
registerDefaultCacheletModule(ModuleDefinition aModule)
|
void |
start(Container aContainer)
Initialise the cache, finding the default cachelet |
void |
stop()
stop method implemented with null body |
void |
write(OutputStream aStream)
outputs the state of the cache with each if its cachelets in XML |
Methods inherited from class com.ten60.netkernel.container.ComponentImpl |
doPeriodicHouseKeeping, getEncoding, getURI |
Methods inherited from class com.ten60.netkernel.urii.representation.SimpleRepresentationImpl |
getAspect, getAspects, getMeta, hasAspect |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ten60.netkernel.urii.IURRepresentation |
getAspect, getAspects, getMeta, hasAspect |
Field Detail |
public static final URIdentifier URI
public static final IURRepresentation EXPIRED_RESOURCE
Constructor Detail |
public Cache()
Method Detail |
public void registerCacheletModule(ModuleDefinition aModule)
public void registerDefaultCacheletModule(ModuleDefinition aModule)
public void start(Container aContainer) throws NetKernelException
start
in interface IComponent
start
in class ComponentImpl
NetKernelException
public void stop() throws NetKernelException
ComponentImpl
stop
in interface IComponent
stop
in class ComponentImpl
NetKernelException
public IURRepresentation get(URRequest aRequest) throws NetKernelException
aRequest
- the request
NetKernelException
- thrown if the cachelet fails in anywaypublic void put(URResult aResult) throws NetKernelException
aResult
- a URResult that has been issued
NetKernelException
- thrown if the cachelet fails in any waypublic void write(OutputStream aStream) throws IOException
write
in interface IAspectBinaryStream
write
in class ComponentImpl
aStream
- an output stream to write the XML to
IOException
- thrown if we fail to write to the stream
|
NetKernel APIs |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |