NetKernel APIs


com.ten60.netkernel.urii.accessor
Class AccessorImpl

java.lang.Object
  extended bycom.ten60.netkernel.urii.representation.SimpleRepresentationImpl
      extended bycom.ten60.netkernel.urii.accessor.AccessorImpl
All Implemented Interfaces:
IURAccessor, IURAspect, IURComponent, IURRepresentation, IURRequestee, IURRequestor
Direct Known Subclasses:
ModuleResourceAccessor

public abstract class AccessorImpl
extends SimpleRepresentationImpl
implements IURAccessor

Skeletal implementation of IURAccessor for an NetKernel inbuild accessors


Field Summary
 
Fields inherited from class com.ten60.netkernel.urii.representation.SimpleRepresentationImpl
mMeta
 
Fields inherited from interface com.ten60.netkernel.urii.accessor.IURAccessor
MIME_TYPE
 
Constructor Summary
AccessorImpl(IURAccessorMeta aMeta)
          Construct a new AccessorImpl
 
Method Summary
 void destroy()
          This method is called to notify the component that it will not be used again.
 IURAccessorMeta getAccessorMeta()
          Return the Meta for this accessor
protected  Container getContainer()
          Return our container
protected  ModuleDefinition getModule()
          Return our module
 void initialise(Container aContainer, ModuleDefinition aModule)
          Initialise the accessor
protected  void issueRequest(URRequest aRequest)
          issue an asychronous request
protected  void issueResult(URRequest aRequest, IURRepresentation aResource, boolean aException)
          return result of our invocation
protected  URResult issueSynchRequest(URRequest aRequest)
          issue a synchronous request
 void receiveAsyncException(URResult aResult)
          default exception handling is to add exception frame and re-throw
 void receiveAsyncResult(URResult aResult)
          This callback must be overriden if we make asynchronous requests so at to receive the results
protected  IURRepresentation transrepresent(IURRepresentation aFrom, URIdentifier aFromURI, Class aToClass, URRequest aOriginalRequest)
          issue a synchronous transrepresentation request
 
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.urrequest.IURRequestee
requestAsync
 
Methods inherited from interface com.ten60.netkernel.urii.IURRepresentation
getAspect, getAspects, getMeta, hasAspect
 

Constructor Detail

AccessorImpl

public AccessorImpl(IURAccessorMeta aMeta)
Construct a new AccessorImpl

Parameters:
aMeta - the meta we shoudl have
Method Detail

initialise

public void initialise(Container aContainer,
                       ModuleDefinition aModule)
Initialise the accessor

Specified by:
initialise in interface IURComponent
Parameters:
aContainer -
aModule -

destroy

public void destroy()
Description copied from interface: IURComponent
This method is called to notify the component that it will not be used again. No service calls will be pending when this method is called.

Specified by:
destroy in interface IURComponent

getAccessorMeta

public IURAccessorMeta getAccessorMeta()
Description copied from interface: IURAccessor
Return the Meta for this accessor

Specified by:
getAccessorMeta in interface IURAccessor

getModule

protected ModuleDefinition getModule()
Return our module


getContainer

protected Container getContainer()
Return our container


receiveAsyncResult

public void receiveAsyncResult(URResult aResult)
This callback must be overriden if we make asynchronous requests so at to receive the results

Specified by:
receiveAsyncResult in interface IURRequestor
Parameters:
aResult - the result of a previous request

receiveAsyncException

public void receiveAsyncException(URResult aResult)
default exception handling is to add exception frame and re-throw

Specified by:
receiveAsyncException in interface IURRequestor
Parameters:
aResult - the exception result of a previous request

issueResult

protected void issueResult(URRequest aRequest,
                           IURRepresentation aResource,
                           boolean aException)
return result of our invocation

Parameters:
aRequest - the request we are replying to
aResource - the data we are providing
aException - true if result is exception, false if it is fine

issueRequest

protected void issueRequest(URRequest aRequest)
issue an asychronous request


issueSynchRequest

protected URResult issueSynchRequest(URRequest aRequest)
                              throws NetKernelException,
                                     InterruptedException
issue a synchronous request

Throws:
NetKernelException
InterruptedException

transrepresent

protected IURRepresentation transrepresent(IURRepresentation aFrom,
                                           URIdentifier aFromURI,
                                           Class aToClass,
                                           URRequest aOriginalRequest)
                                    throws NetKernelException
issue a synchronous transrepresentation request

Parameters:
aFrom - The representation we want to transrepresent
aToClass - The class we want to transrepresent to
aOriginalRequest - The parent request that caused us to want to make this request
Returns:
The transrepresented representation
Throws:
NetKernelException - Thrown if the transrepresentation fails for any reason

NetKernel APIs


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