|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The Session interface.
Fields inherited from class java.io.Serializable |
serialVersionUID |
Method Summary | |
void |
addSessionListener(SessionListener listener)
add the specified Session listener to receive Session events for this Session. |
boolean |
byteArrayExists(java.lang.String byteArrayName)
checks if a Bytearray with this name exists. |
boolean |
byteArrayManaged(java.lang.String byteArrayName)
checks if the Bytearray with this name is managed. |
boolean |
channelExists(java.lang.String channelName)
checks if a Channel with this name exists. |
boolean |
channelManaged(java.lang.String channelName)
checks if the Channel with this name is managed. |
void |
close()
Deprecated. As of JSDT 1.5, the preferred way to do this is via the close(boolean closeConnection) method, setting
closeConnection to false. |
void |
close(boolean closeConnection)
closes the session, rendering the session handle invalid. |
ByteArray |
createByteArray(Client client,
java.lang.String byteArrayName,
boolean autoJoin)
creates a shared ByteArray with the given name which can then be used with the various ByteArray operations. |
ByteArray |
createByteArray(Client client,
java.lang.String byteArrayName,
byte[] value,
boolean autoJoin)
Deprecated. This method is inconsistent with the way Sessions, Channels and Tokens are created. As of JSDT 1.5, the preferred way to do this is via the createByteArray(Client client, String byteArrayName,
boolean autoJoin) method, and then use the
ByteArray.setValue(Client client, byte[] value) method, to
set the initial value. |
ByteArray |
createByteArray(Client client,
java.lang.String byteArrayName,
byte[] value,
ByteArrayManager byteArrayManager)
Deprecated. This method is inconsistent with the way Sessions, Channels and Tokens are created. As of JSDT 1.5, the preferred way to do this is via the createByteArray(Client client, String byteArrayName,
ByteArrayManager byteArrayManager) method, and then use the
ByteArray.setValue(Client client, byte[] value) method, to
set the initial value. |
ByteArray |
createByteArray(Client client,
java.lang.String byteArrayName,
byte[] value,
int offset,
int length,
boolean autoJoin)
Deprecated. This method is inconsistent with the way Sessions, Channels and Tokens are created. As of JSDT 1.5, the preferred way to do this is via the createByteArray(Client client, String byteArrayName,
boolean autoJoin) method, and then use the
ByteArray.setValue(Client client, byte[] value, int offset, int length
method, to set the initial value. |
ByteArray |
createByteArray(Client client,
java.lang.String byteArrayName,
byte[] value,
int offset,
int length,
ByteArrayManager byteArrayManager)
Deprecated. This method is inconsistent with the way Sessions, Channels and Tokens are created. As of JSDT 1.5, the preferred way to do this is via the createByteArray(Client client, String byteArrayName,
ByteArrayManager byteArrayManager) method, and then use the
ByteArray.setValue(Client client, byte[] value, int offset, int length
method, to set the initial value. |
ByteArray |
createByteArray(Client client,
java.lang.String byteArrayName,
ByteArrayManager byteArrayManager)
creates a shared ByteArray with the given name which can then be used with the various ByteArray operations. |
Channel |
createChannel(Client client,
java.lang.String channelName,
boolean reliable,
boolean ordered,
boolean autoJoin)
creates a Channel with the given name which can then be used with the various Channel operations. |
Channel |
createChannel(Client client,
java.lang.String channelName,
boolean reliable,
boolean ordered,
ChannelManager channelManager)
creates a Channel with the given name which can then be used with the various Channel operations. |
Token |
createToken(Client client,
java.lang.String tokenName,
boolean autoJoin)
creates a Token with the given name which can then be used with the various Token operations. |
Token |
createToken(Client client,
java.lang.String tokenName,
TokenManager tokenManager)
creates a Token with the given name which can then be used with the various Token operations. |
ByteArray[] |
getByteArraysJoined(Client client)
return an array of ByteArrays that this Client has successfully joined. |
Channel[] |
getChannelsJoined(Client client)
return an array of Channels that this Client has successfully joined. |
Token[] |
getTokensJoined(Client client)
return an array of Tokens that this Client has successfully joined. |
java.lang.String[] |
listByteArrayNames()
list the names of the ByteArrays that are known to this Session. |
java.lang.String[] |
listChannelNames()
list the names of the Channels that are known to this Session. |
java.lang.String[] |
listTokenNames()
list the names of the Tokens that are known to this Session. |
void |
removeSessionListener(SessionListener listener)
removes the specified Session listener so that it no longer receives Session events for this Session. |
boolean |
tokenExists(java.lang.String tokenName)
checks if a Token with this name exists. |
boolean |
tokenManaged(java.lang.String tokenName)
checks if the Token with this name is managed. |
Methods inherited from interface com.sun.media.jsdt.Manageable |
destroy,
disableListenerEvents,
disableManagerEvents,
enableListenerEvents,
enableManagerEvents,
expel,
getName,
getSession,
invite,
isManaged,
join,
leave,
listClientNames |
Method Detail |
public ByteArray createByteArray(Client client, java.lang.String byteArrayName, boolean autoJoin) throws ConnectionException, InvalidClientException, NameInUseException, NoSuchSessionException, NoSuchClientException, NoSuchHostException, PermissionDeniedException, TimedOutException
If a ByteArray with this name already exists, a reference to that ByteArray is returned. If the ByteArray didn't already exist, then it's initial value will be a zero filled byte array, one byte long.
client
- a Client that will be used for authentication
purposes if this is a managed Session.byteArrayName
- the name to give this ByteArray.autoJoin
- if true, automatically join the ByteArray when
it's created.public ByteArray createByteArray(Client client, java.lang.String byteArrayName, ByteArrayManager byteArrayManager) throws ConnectionException, InvalidClientException, ManagerExistsException, NameInUseException, NoSuchSessionException, NoSuchClientException, NoSuchHostException, PermissionDeniedException, TimedOutException
The initial value for this newly created ByteArray will be a zero filled byte array, one byte long.
client
- a Client that will be used for authentication
purposes if this is a managed Session.byteArrayName
- the name to give this ByteArray.byteArrayManager
- the manager of this ByteArray.public ByteArray createByteArray(Client client, java.lang.String byteArrayName, byte[] value, boolean autoJoin) throws ConnectionException, InvalidClientException, NameInUseException, NoSuchSessionException, NoSuchClientException, NoSuchHostException, PermissionDeniedException, TimedOutException
createByteArray(Client client, String byteArrayName,
boolean autoJoin)
method, and then use the
ByteArray.setValue(Client client, byte[] value)
method, to
set the initial value.client
- a Client that will be used for authentication
purposes if this is a managed Session.byteArrayName
- the name to give this ByteArray.value
- the initial value for the shared ByteArray.autoJoin
- if true, automatically join the ByteArray when
it's created.public ByteArray createByteArray(Client client, java.lang.String byteArrayName, byte[] value, ByteArrayManager byteArrayManager) throws ConnectionException, InvalidClientException, NoSuchSessionException, NoSuchClientException, NoSuchHostException, PermissionDeniedException, ManagerExistsException, TimedOutException
createByteArray(Client client, String byteArrayName,
ByteArrayManager byteArrayManager)
method, and then use the
ByteArray.setValue(Client client, byte[] value)
method, to
set the initial value.client
- a Client that will be used for authentication
purposes if this is a managed Session.byteArrayName
- the name of the ByteArray to create.value
- the initial value for the shared ByteArray.byteArrayManager
- the manager of this ByteArray.public ByteArray createByteArray(Client client, java.lang.String byteArrayName, byte[] value, int offset, int length, boolean autoJoin) throws ConnectionException, InvalidClientException, NameInUseException, NoSuchSessionException, NoSuchClientException, NoSuchHostException, PermissionDeniedException, TimedOutException
createByteArray(Client client, String byteArrayName,
boolean autoJoin)
method, and then use the
ByteArray.setValue(Client client, byte[] value, int offset, int length
method, to set the initial value.client
- a Client that will be used for authentication
purposes if this is a managed Session.byteArrayName
- the name to give this ByteArray.value
- the byte array that is the source of the initial
new shared ByteArray value.offset
- the initial offset within the byte array.length
- the number of bytes to use.*autoJoin
- if true, automatically join the ByteArray when
it's created.public ByteArray createByteArray(Client client, java.lang.String byteArrayName, byte[] value, int offset, int length, ByteArrayManager byteArrayManager) throws ConnectionException, InvalidClientException, NoSuchSessionException, NoSuchClientException, NoSuchHostException, PermissionDeniedException, ManagerExistsException, TimedOutException
createByteArray(Client client, String byteArrayName,
ByteArrayManager byteArrayManager)
method, and then use the
ByteArray.setValue(Client client, byte[] value, int offset, int length
method, to set the initial value.client
- a Client that will be used for authentication
purposes if this is a managed Session.byteArrayName
- the name of the ByteArray to create.value
- the byte array that is the source of the initial
new shared ByteArray value.offset
- the initial offset within the byte array.length
- the number of bytes to use.byteArrayManager
- the manager of this ByteArray.public Channel createChannel(Client client, java.lang.String channelName, boolean reliable, boolean ordered, boolean autoJoin) throws ConnectionException, InvalidClientException, NameInUseException, NoSuchSessionException, NoSuchClientException, NoSuchHostException, PermissionDeniedException, TimedOutException
If a Channel with this name already exists, a reference to that Channel is returned.
client
- a client that will be used for authentication
purposes if this is a managed session.channelName
- the name to give this channel.reliable
- whether the channel is reliable. In other words
whether the channel uses networking technology that reliably delivers data
sent over it (such as TCP), or uses unreliable technology, which possibly
could lose such data (such as UDP). It does not guarantee to reliably
deliver Data messages sent over a Channel.ordered
- whether data sent over the channel is ordered.autoJoin
- if true, automatically join the Channel when
it's created.public Channel createChannel(Client client, java.lang.String channelName, boolean reliable, boolean ordered, ChannelManager channelManager) throws ConnectionException, InvalidClientException, NoSuchSessionException, NoSuchClientException, NoSuchHostException, PermissionDeniedException, ManagerExistsException, TimedOutException
client
- a Client that will be used for authentication
purposes if this is a managed Session.channelName
- the name to give this Channel.reliable
- whether the channel is reliable. In other words
whether the channel uses networking technology that reliably delivers data
sent over it (such as TCP), or uses unreliable technology, which possibly
could lose such data (such as UDP). It does not guarantee to reliably
deliver Data messages sent over a Channel.ordered
- whether Data sent over the Channel is ordered.channelManager
- the manager for this Channel.public Token createToken(Client client, java.lang.String tokenName, boolean autoJoin) throws ConnectionException, InvalidClientException, NameInUseException, NoSuchSessionException, NoSuchClientException, NoSuchHostException, PermissionDeniedException, TimedOutException
If a Token with this name already exists, a reference to that Token is returned.
client
- a Client that will be used for authentication
purposes if this is a managed Session.tokenName
- the name to give this Token.autoJoin
- if true, automatically join the Token when
it's created.public Token createToken(Client client, java.lang.String tokenName, TokenManager tokenManager) throws ConnectionException, InvalidClientException, NoSuchSessionException, NoSuchClientException, NoSuchHostException, PermissionDeniedException, ManagerExistsException, TimedOutException
client
- a Client that will be used for authentication
purposes if this is a managed Session.tokenName
- the name of the Token to create.tokenManager
- the manager of this Token.public boolean byteArrayExists(java.lang.String byteArrayName) throws ConnectionException, NoSuchSessionException, TimedOutException
byteArrayName
- the name of the ByteArray to check on.public boolean channelExists(java.lang.String channelName) throws ConnectionException, NoSuchSessionException, TimedOutException
channelName
- the name of the Channel to check on.public boolean tokenExists(java.lang.String tokenName) throws ConnectionException, NoSuchSessionException, TimedOutException
tokenName
- the name of the Token to check on.public boolean byteArrayManaged(java.lang.String byteArrayName) throws ConnectionException, NoSuchByteArrayException, NoSuchSessionException, TimedOutException
byteArrayName
- the name of the ByteArray to check on.public boolean channelManaged(java.lang.String channelName) throws ConnectionException, NoSuchChannelException, NoSuchSessionException, TimedOutException
channelName
- the name of the Channel to check on.public boolean tokenManaged(java.lang.String tokenName) throws ConnectionException, NoSuchTokenException, NoSuchSessionException, TimedOutException
tokenName
- the name of the Token to check on.public ByteArray[] getByteArraysJoined(Client client) throws ConnectionException, InvalidClientException, NoSuchSessionException, TimedOutException
client
- the Client to check on.public Channel[] getChannelsJoined(Client client) throws ConnectionException, InvalidClientException, NoSuchSessionException, TimedOutException
client
- the Client to check on.public Token[] getTokensJoined(Client client) throws ConnectionException, InvalidClientException, NoSuchSessionException, TimedOutException
client
- the Client to check on.public java.lang.String[] listByteArrayNames() throws ConnectionException, NoSuchSessionException, TimedOutException
public java.lang.String[] listChannelNames() throws ConnectionException, NoSuchSessionException, TimedOutException
public java.lang.String[] listTokenNames() throws ConnectionException, NoSuchSessionException, TimedOutException
public void addSessionListener(SessionListener listener) throws ConnectionException, NoSuchSessionException, TimedOutException
listener
- the Session listener.public void removeSessionListener(SessionListener listener) throws ConnectionException, NoSuchSessionException, NoSuchListenerException, TimedOutException
listener
- the Session listener.public void close() throws ConnectionException, NoSuchSessionException
close(boolean closeConnection)
method, setting
closeConnection
to false.SessionFactory.createSession
public void close(boolean closeConnection) throws ConnectionException, NoSuchSessionException
SessionFactory.createSession
If there are no other Sessions on the same "host:port" as this Session,
the underlying connection being used by this applet or application will
automatically be closed.closeConnection
- indicates whether the underlying connection
used by this applet or application should be forcefully closed. Forcefully
closing this connection would automatically render all references to other
Sessions on the "host:port" being used by this Session as invalid.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |