NetKernel APIs


org.ten60.netkernel.layer1.nkf.impl
Class NKFAccessorImpl

java.lang.Object
  extended byorg.ten60.netkernel.layer1.representation.SimpleRepresentationImpl
      extended byorg.ten60.netkernel.layer1.nkf.impl.NKFAccessorImpl
All Implemented Interfaces:
IURAccessor, IURAspect, IURComponent, IURRepresentation, IURRequestee, IURRequestor

public abstract class NKFAccessorImpl
extends SimpleRepresentationImpl
implements IURAccessor

The main base-class for creating accessors using the NetKernel Foundation API


Field Summary
static boolean NOT_SAFE_FOR_CONCURRENT_USE
           
static boolean SAFE_FOR_CONCURRENT_USE
           
 
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
NKFAccessorImpl(boolean aIsThreadSafe, int aRequestTypes)
          Creates a new instance of NKFAccessorImpl
NKFAccessorImpl(int aRequestTypes)
          Creates a new instance of NKFAccessorImpl
NKFAccessorImpl(int aCreationCost, boolean aIsThreadSafe, int aRequestTypes)
          Creates a new instance of NKFAccessorImpl
 
Method Summary
protected  void declareThreadSafe()
           
 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
 void initialise(Container aContainer, ModuleDefinition aModule)
          This method is called to put the component into action and ready for use.
abstract  void processRequest(INKFConvenienceHelper context)
          subclasses should override this method to perform work
 void receiveAsyncException(URResult aResult)
          subclasses of this accessor cannot issue any asychronous requests
 void receiveAsyncResult(URResult aResult)
          subclasses of this accessor cannot issue any asychronous requests
 void requestAsync(URRequest aRequest)
          Make an asynchronous request
 
Methods inherited from class org.ten60.netkernel.layer1.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

SAFE_FOR_CONCURRENT_USE

public static final boolean SAFE_FOR_CONCURRENT_USE
See Also:
Constant Field Values

NOT_SAFE_FOR_CONCURRENT_USE

public static final boolean NOT_SAFE_FOR_CONCURRENT_USE
See Also:
Constant Field Values
Constructor Detail

NKFAccessorImpl

public NKFAccessorImpl(int aCreationCost,
                       boolean aIsThreadSafe,
                       int aRequestTypes)
Creates a new instance of NKFAccessorImpl


NKFAccessorImpl

public NKFAccessorImpl(boolean aIsThreadSafe,
                       int aRequestTypes)
Creates a new instance of NKFAccessorImpl


NKFAccessorImpl

public NKFAccessorImpl(int aRequestTypes)
Creates a new instance of NKFAccessorImpl

Method Detail

declareThreadSafe

protected void declareThreadSafe()

getAccessorMeta

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

Specified by:
getAccessorMeta in interface IURAccessor

initialise

public void initialise(Container aContainer,
                       ModuleDefinition aModule)
                throws NetKernelException
Description copied from interface: IURComponent
This method is called to put the component into action and ready for use. No service calls will be make until this method completes

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

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

receiveAsyncException

public final void receiveAsyncException(URResult aResult)
subclasses of this accessor cannot issue any asychronous requests

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

receiveAsyncResult

public final void receiveAsyncResult(URResult aResult)
subclasses of this accessor cannot issue any asychronous requests

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

requestAsync

public final void requestAsync(URRequest aRequest)
Description copied from interface: IURRequestee
Make an asynchronous request

Specified by:
requestAsync in interface IURRequestee
Parameters:
aRequest - the request being made

processRequest

public abstract void processRequest(INKFConvenienceHelper context)
                             throws Exception
subclasses should override this method to perform work

Throws:
Throwable - if anything goes wrong
Exception

NetKernel APIs


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