|
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
org.ten60.netkernel.layer1.accessor.ActiveAccessorImpl
org.ten60.netkernel.xml.xahelper.XAccessor
An Highlevel accessor base class written to support migration of an old codebase from NetKernel v1, tailored to XML accessors but supports non-XML datatypes just as well.
Field Summary | |
static String |
OPERAND
|
static String |
OPERATOR
|
static String |
PARAMETER
|
static int |
SUPPORTS_SOURCE_BY_DOM
|
static int |
SUPPORTS_SOURCE_BY_STREAM
|
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 | |
XAccessor()
|
|
XAccessor(int aCost)
|
Method Summary | |
protected void |
declareArgument(String aArgument,
boolean isRequired,
boolean acceptsFragment)
Subclass constructor should call this method to declare which arguments are valid on requests. |
protected void |
declareDisableArgumentChecking()
Subclass constructor should call this method to declare that argument checking should be disabled so that anything can be passed in |
protected void |
declareForgetDependencies()
Subclass constructor may call this method to declare the accessor not to keep dependencies |
protected void |
declareThreadSafe()
Subclass constructor may call this method to declare the accessor as threadsafe |
protected IURRepresentation |
fragment(IURRepresentation aSourceProxy,
String aFragment,
Class aAspectClass,
URRequest aOriginalRequest)
|
protected Container |
getContainer()
return the container we operating within |
protected ModuleDefinition |
getModule()
return the module we reside in |
protected IURRepresentation |
getProxy(URIdentifier aURI,
Class aAspectClass,
URRequest aOriginalRequest)
|
protected Scheduler |
getScheduler()
return the scheduler we can send requests too |
void |
requestAsync(URRequest aRequest)
Make an asynchronous request |
protected abstract IURRepresentation |
source(XAHelper aHelper)
This method must be implemented in subclasses to provide the source functionality |
protected IURRepresentation |
transrepresent(URIdentifier aSourceURI,
IURRepresentation aSourceProxy,
Class aAspectClass,
URRequest aOriginalRequest)
Transrepresent an IURRepresentation to another aspect |
Methods inherited from class org.ten60.netkernel.layer1.accessor.ActiveAccessorImpl |
getAAMeta, setThreadSafe |
Methods inherited from class org.ten60.netkernel.layer1.accessor.AccessorImpl |
destroy, finalize, getAccessorMeta, getResource, initialise, receiveAsyncException, receiveAsyncResult, sinkResource |
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.urii.IURRepresentation |
getAspect, getAspects, getMeta, hasAspect |
Field Detail |
public static final String OPERAND
public static final String OPERATOR
public static final String PARAMETER
public static final int SUPPORTS_SOURCE_BY_DOM
public static final int SUPPORTS_SOURCE_BY_STREAM
Constructor Detail |
public XAccessor()
public XAccessor(int aCost)
Method Detail |
public void requestAsync(URRequest aRequest)
IURRequestee
aRequest
- the request being madeprotected ModuleDefinition getModule()
AccessorImpl
getModule
in class AccessorImpl
protected Container getContainer()
AccessorImpl
getContainer
in class AccessorImpl
protected Scheduler getScheduler()
AccessorImpl
getScheduler
in class AccessorImpl
protected IURRepresentation getProxy(URIdentifier aURI, Class aAspectClass, URRequest aOriginalRequest) throws NetKernelException
NetKernelException
protected IURRepresentation transrepresent(URIdentifier aSourceURI, IURRepresentation aSourceProxy, Class aAspectClass, URRequest aOriginalRequest) throws NetKernelException
AccessorImpl
transrepresent
in class AccessorImpl
aSourceURI
- the URI of aSourceRepresentationaSourceProxy
- the representation we want to change aspects onaAspectClass
- the class of aspect we desireaOriginalRequest
- the parent request that invoked this accessor
NetKernelException
- thrown if the IURRepresentation cannot be transrepresent for any reasonprotected IURRepresentation fragment(IURRepresentation aSourceProxy, String aFragment, Class aAspectClass, URRequest aOriginalRequest) throws NetKernelException
NetKernelException
protected void declareArgument(String aArgument, boolean isRequired, boolean acceptsFragment)
aArgument
- the argument nameisRequired
- true if an argument is required, false if optionalacceptsFragment
- true if an argument can be passed as a URI with a fragment specifierprotected void declareThreadSafe()
protected void declareDisableArgumentChecking()
protected void declareForgetDependencies()
protected abstract IURRepresentation source(XAHelper aHelper) throws Exception
aHelper
- the XAHelper with all necessary state
Throwable
- thrown if it fails for any reason
Exception
|
NetKernel APIs |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |