|
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
public class 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(java.io.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 IComponentstart in class ComponentImplaContainer - the container we will execute inside
NetKernelException - thrown if we encounter any error during startup
public void stop()
throws NetKernelException
ComponentImpl
stop in interface IComponentstop in class ComponentImplNetKernelException - thrown if we encounter any error during startup
public IURRepresentation get(URRequest aRequest)
throws NetKernelException
aRequest - the request
NetKernelException - thrown if the cachelet fails in anyway
public void put(URResult aResult)
throws NetKernelException
aResult - a URResult that has been issued
NetKernelException - thrown if the cachelet fails in any way
public void write(java.io.OutputStream aStream)
throws java.io.IOException
write in interface IAspectBinaryStreamwrite in class ComponentImplaStream - an output stream to write the XML to
java.io.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 | |||||||||