NetKernel APIs


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

java.lang.Object
  extended byorg.ten60.netkernel.layer1.nkf.impl.NKFRequestImpl
All Implemented Interfaces:
INKFRequest

public class NKFRequestImpl
extends Object
implements INKFRequest

Wrapper around the construction of a sub-request from within an accessor


Constructor Summary
NKFRequestImpl(NKFRequestReadOnlyImpl aParentRequest, ModuleDefinition aContext, String aCWU)
          Creates a new instance of NKFRequestImpl
 
Method Summary
 void addArgument(String aName, IURAspect aValue)
          Adds a named pass-by-value argument to the request from an aspect which has been created from internal processing of the accessor.
 void addArgument(String aName, IURRepresentation aValue)
          Adds a named pass-by-value argument to the request (a unique internal URI will be dynamically generated for the argument).
 void addArgument(String aName, String aURI)
          Adds a named pass-by-reference argument to the request.
 void addSystemArgument(IURAspect aValue)
          Adds a system argument (for use in transrept and sink requests.
 void addSystemArgument(IURRepresentation aValue)
          Adds a system argument (for use in transrept and sink requests.
 Class getAspectClass()
           
 void setAspectClass(Class aAspectClass)
          Sets the class of aspect that is expected as a response to the request, will default to IURAspect which is the baseclass of all aspects and will allow anything to be returned
 void setCWU(String aCWU)
          Sets the current working URI of the request, defaults to the same CWU as the parent request
 void setFragment(String aFragment)
          Set a fragment identifier on to the request URI
 void setRequestType(int aType)
          Sets the type of the request, defaults to RQT_SOURCE
 void setURI(String aURI)
          Sets the base URI of the request, defaults to nothing and using it will fail if not set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NKFRequestImpl

public NKFRequestImpl(NKFRequestReadOnlyImpl aParentRequest,
                      ModuleDefinition aContext,
                      String aCWU)
Creates a new instance of NKFRequestImpl

Method Detail

addArgument

public void addArgument(String aName,
                        String aURI)
                 throws NKFException
Description copied from interface: INKFRequest
Adds a named pass-by-reference argument to the request. A pass by reference argument is simply a URI to the resource.

Specified by:
addArgument in interface INKFRequest
Parameters:
aName - the name of the argument
aURI - the URI of the argument, if this is relative it will be resolved
Throws:
NKFException - thrown if relative URI cannot be resolved

addArgument

public void addArgument(String aName,
                        IURRepresentation aValue)
Description copied from interface: INKFRequest
Adds a named pass-by-value argument to the request (a unique internal URI will be dynamically generated for the argument). The argument is passed by value.

Specified by:
addArgument in interface INKFRequest
Parameters:
aName -
aValue -

addArgument

public void addArgument(String aName,
                        IURAspect aValue)
Description copied from interface: INKFRequest
Adds a named pass-by-value argument to the request from an aspect which has been created from internal processing of the accessor. (a unique internal URI will be dynamically generated for the argument). The argument is passed by value. The aspect is wrapped in a representation and is given metadata with zero cost, a mimetype of content/unknown and with a validity period of 1 day (assume infinite).

Specified by:
addArgument in interface INKFRequest
Parameters:
aName -
aValue -

addSystemArgument

public void addSystemArgument(IURRepresentation aValue)
Description copied from interface: INKFRequest
Adds a system argument (for use in transrept and sink requests.

Specified by:
addSystemArgument in interface INKFRequest
Parameters:
aValue -

addSystemArgument

public void addSystemArgument(IURAspect aValue)
Description copied from interface: INKFRequest
Adds a system argument (for use in transrept and sink requests.

Specified by:
addSystemArgument in interface INKFRequest
Parameters:
aValue -

setAspectClass

public void setAspectClass(Class aAspectClass)
Description copied from interface: INKFRequest
Sets the class of aspect that is expected as a response to the request, will default to IURAspect which is the baseclass of all aspects and will allow anything to be returned

Specified by:
setAspectClass in interface INKFRequest
Parameters:
aAspectClass - if null it will default to IURAspect, and allow any aspect to be returned (i.e. no transreption will occur)

getAspectClass

public Class getAspectClass()

setCWU

public void setCWU(String aCWU)
Description copied from interface: INKFRequest
Sets the current working URI of the request, defaults to the same CWU as the parent request

Specified by:
setCWU in interface INKFRequest
Parameters:
aCWU -

setRequestType

public void setRequestType(int aType)
Description copied from interface: INKFRequest
Sets the type of the request, defaults to RQT_SOURCE

Specified by:
setRequestType in interface INKFRequest
Parameters:
aType -

setURI

public void setURI(String aURI)
            throws NKFException
Description copied from interface: INKFRequest
Sets the base URI of the request, defaults to nothing and using it will fail if not set.

Specified by:
setURI in interface INKFRequest
Parameters:
aURI -
Throws:
NKFException - thrown if aURI is relative and cwu not set

setFragment

public void setFragment(String aFragment)
Description copied from interface: INKFRequest
Set a fragment identifier on to the request URI

Specified by:
setFragment in interface INKFRequest
Parameters:
aFragment -

NetKernel APIs


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