|
NetKernel APIs |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ten60.netkernel.layer1.representation.SimpleRepresentationImpl
org.ten60.netkernel.layer1.accessor.AccessorImpl
public abstract class AccessorImpl
Base class for implementing simple accessors. Contains default error handling for child requests to case parent requests to fail. It contains helper methods for requesting and transrepresenting resources
| Field Summary |
|---|
| Fields inherited from class org.ten60.netkernel.layer1.representation.SimpleRepresentationImpl |
|---|
mMeta |
| Fields inherited from interface com.ten60.netkernel.urii.accessor.IURAccessor |
|---|
MIME_TYPE |
| Constructor Summary | |
|---|---|
AccessorImpl(IURMeta aMeta)
construct a new AccessorImpl |
|
| Method Summary | |
|---|---|
void |
destroy()
destroy the accessor |
protected void |
finalize()
|
IURAccessorMeta |
getAccessorMeta()
Return the Meta for this accessor |
protected Container |
getContainer()
return the container we operating within |
protected ModuleDefinition |
getModule()
return the module we reside in |
protected IURRepresentation |
getResource(URIdentifier aURI,
java.lang.Class aAspectClass,
URRequest aOriginalRequest)
Gets a IURRepresentation for a given URI. |
protected Scheduler |
getScheduler()
return the scheduler we can send requests too |
void |
initialise(Container aContainer,
ModuleDefinition aModule)
initialise the accessor |
void |
receiveAsyncException(URResult aResult)
default exception handling is to add exception frame and re-throw |
void |
receiveAsyncResult(URResult aResult)
By default we ignore any results we receive- override this if you are making asychronous requests |
protected void |
sinkResource(URIdentifier aURI,
IURRepresentation aRepresentation,
URRequest aOriginalRequest)
Sink a resource to a URI |
protected IURRepresentation |
transrepresent(URIdentifier aSourceURI,
IURRepresentation aSourceRepresentation,
java.lang.Class aTargetClass,
URRequest aOriginalRequest)
Transrepresent an IURRepresentation to another aspect |
| Methods inherited from class org.ten60.netkernel.layer1.representation.SimpleRepresentationImpl |
|---|
getAspect, getAspects, getMeta, hasAspect |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.ten60.netkernel.urrequest.IURRequestee |
|---|
requestAsync |
| Methods inherited from interface com.ten60.netkernel.urii.IURRepresentation |
|---|
getAspect, getAspects, getMeta, hasAspect |
| Constructor Detail |
|---|
public AccessorImpl(IURMeta aMeta)
aCost - the cost of creation of this accessoraIsThreadSafe - true if the accessor is to be considered threadsafe| Method Detail |
|---|
public IURAccessorMeta getAccessorMeta()
IURAccessor
getAccessorMeta in interface IURAccessor
public void initialise(Container aContainer,
ModuleDefinition aModule)
throws NetKernelException
initialise in interface IURComponentNetKernelExceptionpublic void destroy()
destroy in interface IURComponentpublic void receiveAsyncException(URResult aResult)
receiveAsyncException in interface IURRequestoraResult - the exception result of a previous requestpublic void receiveAsyncResult(URResult aResult)
receiveAsyncResult in interface IURRequestoraResult - the result of a previous requestprotected ModuleDefinition getModule()
protected Container getContainer()
protected Scheduler getScheduler()
protected IURRepresentation getResource(URIdentifier aURI,
java.lang.Class aAspectClass,
URRequest aOriginalRequest)
throws NetKernelException
aURI - the URI of the resource we wantaAspectClass - the class of an aspect that the representation must exhibitaOriginalRequest - the original parent request
NetKernelException - thrown the request fails for any reason
protected IURRepresentation transrepresent(URIdentifier aSourceURI,
IURRepresentation aSourceRepresentation,
java.lang.Class aTargetClass,
URRequest aOriginalRequest)
throws NetKernelException
aSourceURI - the URI of aSourceRepresentationaSourceRepresentation - the representation we want to change aspects onaTargetClass - the class of aspect we desireaOriginalRequest - the parent request that invoked this accessor
NetKernelException - thrown if the IURRepresentation cannot be transrepresent for any reason
protected void sinkResource(URIdentifier aURI,
IURRepresentation aRepresentation,
URRequest aOriginalRequest)
throws NetKernelException
aURI - the URI to sink toaRepresentation - the representation of the data we want to sinkaOriginalRequest - the parent request that invoked this accessor
NetKernelException - thrown if request fails for any reasonprotected void finalize()
finalize in class java.lang.Object
|
NetKernel APIs |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||