|
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
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,
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,
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)
Method Detail |
public IURAccessorMeta getAccessorMeta()
IURAccessor
getAccessorMeta
in interface IURAccessor
public void initialise(Container aContainer, ModuleDefinition aModule) throws NetKernelException
initialise
in interface IURComponent
aContainer
- aModule
-
NetKernelException
public void destroy()
destroy
in interface IURComponent
public void receiveAsyncException(URResult aResult)
receiveAsyncException
in interface IURRequestor
aResult
- the exception result of a previous requestpublic void receiveAsyncResult(URResult aResult)
receiveAsyncResult
in interface IURRequestor
aResult
- the result of a previous requestprotected ModuleDefinition getModule()
protected Container getContainer()
protected Scheduler getScheduler()
protected IURRepresentation getResource(URIdentifier aURI, 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 reasonprotected IURRepresentation transrepresent(URIdentifier aSourceURI, IURRepresentation aSourceRepresentation, 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 reasonprotected 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()
|
NetKernel APIs |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |