public final class PluginManager.Session extends java.lang.Object implements ISession
Constructor and Description |
---|
PluginManager.Session(SystemID target,
short ability,
boolean remote,
boolean incoming)
Creates a new session object that denotes a plug-in with the
specified ability.
|
Modifier and Type | Method and Description |
---|---|
PluginManager.Session |
copy(boolean deep)
Creates a copy of the session.
|
short |
getAbility()
Returns the ability of the session.
|
ISession |
getChild()
Returns the child of the session.
|
java.lang.Object |
getLocal()
Returns the local data object that has been negotiated during the
negotiation phase.
|
PluginManager.Session |
getParent()
Returns the parent of the session.
|
byte[] |
getRemote()
Returns the remote data that is currently set.
|
SystemID |
getTarget()
Returns the target of the session.
|
boolean |
isIncoming()
Determines whether the session is incoming.
|
boolean |
isOutgoing()
Determines whether the session is outgoing.
|
void |
setChild(PluginManager.Session child)
Sets the child of the session.
|
void |
setLocal(java.lang.Object data)
Sets the local data object that contains the negotiated connection
properties that are required to open a connection.
|
void |
setParent(PluginManager.Session parent)
Sets the parent of the session.
|
void |
setRemote(byte[] data)
Sets the remote data that will be transfered to the other endpoint.
|
boolean |
supportsRemote()
Determines whether it is valid to set and retrieve the remote
data bytes.
|
public PluginManager.Session(SystemID target, short ability, boolean remote, boolean incoming)
ability
- The ability of the plug-in denoted by this
session object.remote
- True if the remote session data can be stored,
false if storing remote session data should throw an
exception.target
- The remote system that would be the target
of the session.incoming
- A flag that indicates whether the specified
session is incoming.public java.lang.Object getLocal()
public void setLocal(java.lang.Object data)
public void setRemote(byte[] data)
public byte[] getRemote()
public boolean supportsRemote()
supportsRemote
in interface ISession
public boolean isIncoming()
isIncoming
in interface ISession
public boolean isOutgoing()
isOutgoing
in interface ISession
public void setParent(PluginManager.Session parent)
parent
- The new parent of the session.public PluginManager.Session getParent()
public void setChild(PluginManager.Session child)
child
- The new child of the session.public ISession getChild()
public SystemID getTarget()
public short getAbility()
getAbility
in interface ISession
public PluginManager.Session copy(boolean deep)
deep
- A flag that indicates whether the copy should
be deep or shallow.