|
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
public abstract class 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 java.lang.String |
OPERAND
|
static java.lang.String |
OPERATOR
|
static java.lang.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(java.lang.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,
java.lang.String aFragment,
java.lang.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,
java.lang.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,
java.lang.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 java.lang.String OPERAND
public static final java.lang.String OPERATOR
public static final java.lang.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 AccessorImplprotected Container getContainer()
AccessorImpl
getContainer in class AccessorImplprotected Scheduler getScheduler()
AccessorImpl
getScheduler in class AccessorImpl
protected IURRepresentation getProxy(URIdentifier aURI,
java.lang.Class aAspectClass,
URRequest aOriginalRequest)
throws NetKernelException
NetKernelException
protected IURRepresentation transrepresent(URIdentifier aSourceURI,
IURRepresentation aSourceProxy,
java.lang.Class aAspectClass,
URRequest aOriginalRequest)
throws NetKernelException
AccessorImpl
transrepresent in class AccessorImplaSourceURI - 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 reason
protected IURRepresentation fragment(IURRepresentation aSourceProxy,
java.lang.String aFragment,
java.lang.Class aAspectClass,
URRequest aOriginalRequest)
throws NetKernelException
NetKernelException
protected void declareArgument(java.lang.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 java.lang.Exception
aHelper - the XAHelper with all necessary state
java.lang.Throwable - thrown if it fails for any reason
java.lang.Exception
|
NetKernel APIs |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||