|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.media.jsdt.impl.JSDTObject | +--com.sun.media.jsdt.impl.ManageableImpl | +--com.sun.media.jsdt.impl.SessionImpl
JSDT Session (implementation) class.
Field Summary | |
static char |
M_Session
To signify a manageable object of type Session. |
AbstractSessionProxy |
po
Handle to client-side proxy. |
AbstractSessionServer |
so
Handle to server-side object. |
Fields inherited from class com.sun.media.jsdt.impl.ManageableImpl |
mpo,
name,
objectType |
Fields inherited from class com.sun.media.jsdt.impl.JSDTObject |
giveTime,
httpTunnelPort,
maxQueueSize,
maxThreadPoolSize,
pingPeriod,
registryAddress,
registryPort,
registryTime,
showMessage,
showStack,
socketFactoryClass,
SSLCipher,
timeoutPeriod,
TTL,
versionString |
Constructor Summary | |
SessionImpl()
|
Method Summary | |
void |
addSessionListener(com.sun.media.jsdt.event.SessionListener listener)
addSessionListener add a listener to the list that will be informed when any client undergoes any changes 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. |
com.sun.media.jsdt.ByteArray |
createByteArray(com.sun.media.jsdt.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. |
com.sun.media.jsdt.ByteArray |
createByteArray(com.sun.media.jsdt.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. |
com.sun.media.jsdt.ByteArray |
createByteArray(com.sun.media.jsdt.Client client,
java.lang.String byteArrayName,
byte[] value,
com.sun.media.jsdt.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. |
com.sun.media.jsdt.ByteArray |
createByteArray(com.sun.media.jsdt.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. |
com.sun.media.jsdt.ByteArray |
createByteArray(com.sun.media.jsdt.Client client,
java.lang.String byteArrayName,
byte[] value,
int offset,
int length,
com.sun.media.jsdt.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. |
com.sun.media.jsdt.ByteArray |
createByteArray(com.sun.media.jsdt.Client client,
java.lang.String byteArrayName,
com.sun.media.jsdt.ByteArrayManager byteArrayManager)
creates a shared ByteArray with the given name which can then be used with the various ByteArray operations. |
com.sun.media.jsdt.Channel |
createChannel(com.sun.media.jsdt.Client client,
java.lang.String channelName,
boolean reliable,
boolean ordered,
boolean autoJoin)
createChannel creates a channel with the given name which can then be used with the various channel operations. |
com.sun.media.jsdt.Channel |
createChannel(com.sun.media.jsdt.Client client,
java.lang.String channelName,
boolean reliable,
boolean ordered,
com.sun.media.jsdt.ChannelManager channelManager)
creates a Channel with the given name which can then be used with the various Channel operations. |
com.sun.media.jsdt.Token |
createToken(com.sun.media.jsdt.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. |
com.sun.media.jsdt.Token |
createToken(com.sun.media.jsdt.Client client,
java.lang.String tokenName,
com.sun.media.jsdt.TokenManager tokenManager)
creates a Token with the given name which can then be used with the various Token operations. |
com.sun.media.jsdt.ByteArray[] |
getByteArraysJoined(com.sun.media.jsdt.Client client)
return an array of ByteArrays that this Client has successfully joined. |
com.sun.media.jsdt.Channel[] |
getChannelsJoined(com.sun.media.jsdt.Client client)
return an array of Channels that this Client has successfully joined. |
com.sun.media.jsdt.Token[] |
getTokensJoined(com.sun.media.jsdt.Client client)
return an array of Tokens that this Client has successfully joined. |
java.lang.String[] |
listByteArrayNames()
listByteArrayNames list the names of the shared byte arrays that are known to this session. |
java.lang.String[] |
listChannelNames()
listChannelNames list the names of the channels that are known to this session. |
java.lang.String[] |
listTokenNames()
listTokenNames list the names of the tokens that are known to this session. |
void |
removeSessionListener(com.sun.media.jsdt.event.SessionListener listener)
removes the specified Session listener so that it no longer receives Session events for this Session. |
void |
setName(java.lang.String sessionName)
setName set the name of 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 class com.sun.media.jsdt.impl.ManageableImpl |
addListener,
destroy,
disableListenerEvents,
disableManagerEvents,
enableListenerEvents,
enableManagerEvents,
expel,
getName,
getSession,
invite,
isManaged,
join,
leave,
listClientNames |
Methods inherited from class com.sun.media.jsdt.impl.JSDTObject |
error,
getConnectionType,
setConnectionType |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final char M_Session
public AbstractSessionProxy po
public AbstractSessionServer so
Constructor Detail |
public SessionImpl()
Method Detail |
public com.sun.media.jsdt.ByteArray createByteArray(com.sun.media.jsdt.Client client, java.lang.String byteArrayName, boolean autoJoin) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NameInUseException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchHostException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.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 single zero filled byte.
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 com.sun.media.jsdt.ByteArray createByteArray(com.sun.media.jsdt.Client client, java.lang.String byteArrayName, com.sun.media.jsdt.ByteArrayManager byteArrayManager) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.ManagerExistsException, com.sun.media.jsdt.NameInUseException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchHostException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.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 com.sun.media.jsdt.ByteArray createByteArray(com.sun.media.jsdt.Client client, java.lang.String byteArrayName, byte[] value, boolean autoJoin) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NameInUseException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchHostException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.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 com.sun.media.jsdt.ByteArray createByteArray(com.sun.media.jsdt.Client client, java.lang.String byteArrayName, byte[] value, com.sun.media.jsdt.ByteArrayManager byteArrayManager) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchHostException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.ManagerExistsException, com.sun.media.jsdt.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 com.sun.media.jsdt.ByteArray createByteArray(com.sun.media.jsdt.Client client, java.lang.String byteArrayName, byte[] value, int offset, int length, boolean autoJoin) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NameInUseException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchHostException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.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 com.sun.media.jsdt.ByteArray createByteArray(com.sun.media.jsdt.Client client, java.lang.String byteArrayName, byte[] value, int offset, int length, com.sun.media.jsdt.ByteArrayManager byteArrayManager) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchHostException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.ManagerExistsException, com.sun.media.jsdt.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 com.sun.media.jsdt.Channel createChannel(com.sun.media.jsdt.Client client, java.lang.String channelName, boolean reliable, boolean ordered, boolean autoJoin) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NameInUseException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchHostException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.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 data delivery is guarenteed.ordered
- whether data sent over the channel is ordered.autoJoin
- if true, then the given client is automatically
joined to this channel.public com.sun.media.jsdt.Channel createChannel(com.sun.media.jsdt.Client client, java.lang.String channelName, boolean reliable, boolean ordered, com.sun.media.jsdt.ChannelManager channelManager) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchHostException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.ManagerExistsException, com.sun.media.jsdt.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 data delivery is guarenteed.ordered
- whether Data sent over the Channel is ordered.channelManager
- the manager for this Channel.public com.sun.media.jsdt.Token createToken(com.sun.media.jsdt.Client client, java.lang.String tokenName, boolean autoJoin) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NameInUseException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchHostException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.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 com.sun.media.jsdt.Token createToken(com.sun.media.jsdt.Client client, java.lang.String tokenName, com.sun.media.jsdt.TokenManager tokenManager) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.NoSuchClientException, com.sun.media.jsdt.NoSuchHostException, com.sun.media.jsdt.PermissionDeniedException, com.sun.media.jsdt.ManagerExistsException, com.sun.media.jsdt.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 com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.TimedOutException
byteArrayName
- the name of the ByteArray to check on.public boolean channelExists(java.lang.String channelName) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.TimedOutException
channelName
- the name of the Channel to check on.public boolean tokenExists(java.lang.String tokenName) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.TimedOutException
tokenName
- the name of the Token to check on.public boolean byteArrayManaged(java.lang.String byteArrayName) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.NoSuchByteArrayException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.TimedOutException
byteArrayName
- the name of the ByteArray to check on.public boolean channelManaged(java.lang.String channelName) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.NoSuchChannelException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.TimedOutException
channelName
- the name of the Channel to check on.public boolean tokenManaged(java.lang.String tokenName) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.NoSuchTokenException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.TimedOutException
tokenName
- the name of the Token to check on.public com.sun.media.jsdt.ByteArray[] getByteArraysJoined(com.sun.media.jsdt.Client client) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.TimedOutException
client
- the Client to check on.public com.sun.media.jsdt.Channel[] getChannelsJoined(com.sun.media.jsdt.Client client) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.TimedOutException
client
- the Client to check on.public com.sun.media.jsdt.Token[] getTokensJoined(com.sun.media.jsdt.Client client) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.InvalidClientException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.TimedOutException
client
- the Client to check on.public java.lang.String[] listByteArrayNames() throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.TimedOutException
public java.lang.String[] listChannelNames() throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.TimedOutException
public java.lang.String[] listTokenNames() throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.TimedOutException
public void addSessionListener(com.sun.media.jsdt.event.SessionListener listener) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.TimedOutException
listener
- the listener being added.public void removeSessionListener(com.sun.media.jsdt.event.SessionListener listener) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.NoSuchSessionException, com.sun.media.jsdt.NoSuchListenerException, com.sun.media.jsdt.TimedOutException
listener
- the Session listener.public void close() throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.NoSuchSessionException
close(boolean closeConnection)
method, setting
closeConnection
to false.SessionFactory.createSession
public void close(boolean closeConnection) throws com.sun.media.jsdt.ConnectionException, com.sun.media.jsdt.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.public void setName(java.lang.String sessionName)
sessionName
- the name of the session.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |