|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.org.ogsadai.sessions.impl.SafeSession
Adapts the InternalSession interface to the
Session interface. This protects the management
operations defined in the InternalSession interface.
| Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
|
private InternalSession |
mSession
|
| Constructor Summary | |
SafeSession(InternalSession session)
Constructs a safe session wrapping the specified internal session. |
|
| Method Summary | |
void |
addExternalInput(java.lang.String name,
Pipe input)
Adds an external input session stream. |
void |
addExternalOutput(java.lang.String name,
Pipe output)
Adds an external output session stream. |
boolean |
containsAttribute(javax.xml.namespace.QName name)
Indicates whether or not the session contains a session attribute with the specified name. |
int |
countAttributes()
Returns the number of session attributes contained in the session. |
SessionAttribute |
getAttribute(javax.xml.namespace.QName name)
Gets the session attribute for the given name or null if no such attribute exists. |
java.util.Set |
getAttributeNames()
Returns a set of the names of the session attributes contained in the session. |
java.lang.Object |
getAttributeValue(javax.xml.namespace.QName name)
Gets the actual value of the session attribute with the given name. |
Pipe |
getExternalInput(java.lang.String name)
Gets the Pipe for the external input with the
specified name allowing data to be written into the pipe or
read from it. |
Pipe |
getExternalOutput(java.lang.String name)
Gets the Pipe for the external output with the
specified name allowing data to be written to it of read from
it. |
SessionID |
getID()
Returns the SessionID object identifying the
session. |
Properties |
getProperties()
Gets the set of data service resource properties that are available to this session. |
ProcessingStatus |
getRequestStatus()
Gets the session request processing status. |
boolean |
hasExternalInput(java.lang.String name)
Checks whether the context contains a Pipe for an
external input with the specified name. |
boolean |
hasExternalOutput(java.lang.String name)
Checks whether the context contains a Pipe for an
external output with the specified name. |
void |
removeAttribute(javax.xml.namespace.QName name)
Removes a named session attribute from the session unless it is a static session attribute. |
void |
removeExternalInput(java.lang.String name)
Removes an external input session stream. |
void |
removeExternalOutput(java.lang.String name)
Removes an external output session stream. |
void |
setAttribute(SessionAttribute property)
Sets the specified session attribute, storing it in the session. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private final InternalSession mSession
| Constructor Detail |
public SafeSession(InternalSession session)
session - The InternalSession to wrap.
java.lang.IllegalArgumentException - if session is
null.| Method Detail |
public boolean containsAttribute(javax.xml.namespace.QName name)
Session
containsAttribute in interface Sessionname - The name of the session attribute as a QName.
true if the session attribute exists,
false otherwise.public int countAttributes()
Session
countAttributes in interface Sessionpublic SessionAttribute getAttribute(javax.xml.namespace.QName name)
Sessionnull if no such attribute exists.
getAttribute in interface Sessionname - The name of the session attribute as a QName.
null.public java.util.Set getAttributeNames()
Session
getAttributeNames in interface SessionQName objects.public java.lang.Object getAttributeValue(javax.xml.namespace.QName name)
Session
Session attributes encapsulate a name-value pair, so this
method is provided as a convenient way to access the session
attribute value directly. It is equivalent to
getSessionAttribute().getValue().
getAttributeValue in interface Sessionname - The name of the session attribute as a QName.
Object that is the session attribute
value or null if the attribute does not exist (or
the attribute value is actually null).public SessionID getID()
SessionSessionID object identifying the
session.
getID in interface SessionSessionID
public void removeAttribute(javax.xml.namespace.QName name)
throws StaticSessionAttrException
Session
Static session attributes are identified by the
false return value of their
isChangable method. If the named session attribute
does not exist then no action is taken.
removeAttribute in interface Sessionname - The QName of the session attribute to remove.
StaticSessionAttrException - If name identifies a static session attribute.
public void setAttribute(SessionAttribute property)
throws StaticSessionAttrException
SessionIf an attribute with the same name already exists, then the existing attribute is overwritten, unless it is a static session attribute. Static session attributes cannot be overwritten.
setAttribute in interface Sessionproperty - The SessionAttribute to store in the session.
StaticSessionAttrException - If name identifies a static session attribute.public Properties getProperties()
SessionSession participants, such as activities, may query, add and remove properties from this at runtime.
getProperties in interface SessionProperties objectpublic ProcessingStatus getRequestStatus()
SessionThis is the status of the current request that is processing in the session.
getRequestStatus in interface SessionProcessingStatus.public boolean hasExternalInput(java.lang.String name)
SessionPipe for an
external input with the specified name.
hasExternalInput in interface Sessionname - The name of the external input.
true if the input exists, false
otherwise.public boolean hasExternalOutput(java.lang.String name)
SessionPipe for an
external output with the specified name.
hasExternalOutput in interface Sessionname - The name of the external output.
true if the output exists, false
otherwise.public Pipe getExternalOutput(java.lang.String name)
SessionPipe for the external output with the
specified name allowing data to be written to it of read from
it.
getExternalOutput in interface Sessionname - The name of the external output.
Pipe from which data can be read or
null if there is no output with the specified
name.public Pipe getExternalInput(java.lang.String name)
SessionPipe for the external input with the
specified name allowing data to be written into the pipe or
read from it.
getExternalInput in interface Sessionname - The name of the external input.
Pipe to which data can be written or
null if there is no input with the specified
name.
public void addExternalInput(java.lang.String name,
Pipe input)
throws SessionStreamDuplicateException
Session
This is a Pipe that can receive input data from an
external agent and be read from by an activity or session
participant.
addExternalInput in interface Sessionname - The name of the session stream.input - The pipe for the data.
SessionStreamDuplicateException - if an external input
session stream with the same name has already been added to the
session.
public void addExternalOutput(java.lang.String name,
Pipe output)
throws SessionStreamDuplicateException
Session
This is a Pipe that can receive input data from an
activity or session participant. This data can then be read by
an external agent.
addExternalOutput in interface Sessionname - The name of the session stream.output - The pipe for the data.
SessionStreamDuplicateException - if an external output
session stream with the same name has already been added to the
session.public void removeExternalInput(java.lang.String name)
SessionAfter this method has returned the session stream will no longer be available to external agents.
removeExternalInput in interface Sessionname - The name of the session stream. If no stream exists with this
name then no action is taken.public void removeExternalOutput(java.lang.String name)
SessionAfter this method has returned the session stream will no longer be available to external agents.
removeExternalOutput in interface Sessionname - The name of the session stream. If no stream exists with this
name then no action is taken.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||