com.sun.media.jsdt.impl
Class ManageableImpl
java.lang.Object
|
+--com.sun.media.jsdt.impl.JSDTObject
|
+--com.sun.media.jsdt.impl.ManageableImpl
- Direct Known Subclasses:
- ByteArrayImpl, ChannelImpl, SessionImpl, TokenImpl
- public abstract class ManageableImpl
- extends JSDTObject
- implements com.sun.media.jsdt.Manageable
JSDT Manageable (implementation) class.
- Version:
- 1.5 - 8th February 1999
- Author:
- Rich Burridge
- See Also:
- Serialized Form
Field Summary |
AbstractManageableProxy |
mpo
Handle to manageable client-side proxy. |
protected java.lang.String |
name
The name of this object. |
protected char |
objectType
The type of this object (ByteArray, Channel, Session or Token). |
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 |
Method Summary |
void |
addListener(java.util.EventListener listener)
addListener add a listener to this manageable object. |
void |
destroy(com.sun.media.jsdt.Client client)
destroy this Manageable object. |
void |
disableListenerEvents(java.util.EventListener listener,
int eventMask)
disable certain events for this JSDT listener. |
void |
disableManagerEvents(com.sun.media.jsdt.JSDTManager manager,
int eventMask)
disable certain events for the manager (if any) associated with this
manageable object. |
void |
enableListenerEvents(java.util.EventListener listener,
int eventMask)
enable certain events for this JSDT listener. |
void |
enableManagerEvents(com.sun.media.jsdt.JSDTManager manager,
int eventMask)
enable certain events for the manager (if any) associated with this
manageable object. |
void |
expel(com.sun.media.jsdt.Client[] clients)
expel Clients from this Manageable object. |
java.lang.String |
getName()
getName get the name of this object. |
com.sun.media.jsdt.Session |
getSession()
get the name of the Session that this manageable object belongs to. |
void |
invite(com.sun.media.jsdt.Client[] clients)
invite Clients to join this Manageable object. |
boolean |
isManaged()
test whether this managed object actually has a manager associated with it. |
void |
join(com.sun.media.jsdt.Client client)
join joins a client to this manageable object. |
void |
leave(com.sun.media.jsdt.Client client)
leave removes a client from this manageable object. |
java.lang.String[] |
listClientNames()
listClientNames list the names of the clients who are joined
to this manageable object. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
name
protected java.lang.String name
- The name of this object.
objectType
protected char objectType
- The type of this object (ByteArray, Channel, Session or Token).
mpo
public AbstractManageableProxy mpo
- Handle to manageable client-side proxy.
ManageableImpl
public ManageableImpl()
getName
public java.lang.String getName()
-
getName get the name of this object.
- Specified by:
- getName in interface com.sun.media.jsdt.Manageable
- Returns:
- the name of this object.
getSession
public com.sun.media.jsdt.Session getSession()
-
get the name of the Session that this manageable object belongs to. If
this method is applied to a Session, a reference to itself is returned.
- Specified by:
- getSession in interface com.sun.media.jsdt.Manageable
- Returns:
- the name of the Session that this manageable object belongs to.
addListener
public void addListener(java.util.EventListener listener)
throws com.sun.media.jsdt.ConnectionException,
com.sun.media.jsdt.NoSuchByteArrayException,
com.sun.media.jsdt.NoSuchChannelException,
com.sun.media.jsdt.NoSuchSessionException,
com.sun.media.jsdt.NoSuchTokenException,
com.sun.media.jsdt.TimedOutException
-
addListener add a listener to this manageable object.
- Parameters:
listener
- the listener for this manageable object.- Throws:
- com.sun.media.jsdt.ConnectionException - if a connection error occured.
- com.sun.media.jsdt.NoSuchByteArrayException - if this ByteArray doesn't exist
- com.sun.media.jsdt.NoSuchChannelException - if this Channel doesn't exist.
- com.sun.media.jsdt.NoSuchSessionException - if this Session doesn't exist.
- com.sun.media.jsdt.NoSuchTokenException - if this Token doesn't exist.
- com.sun.media.jsdt.TimedOutException - if no reply was received for this operation
in the given timeout period.
enableListenerEvents
public void enableListenerEvents(java.util.EventListener listener,
int eventMask)
throws com.sun.media.jsdt.NoSuchSessionException,
com.sun.media.jsdt.NoSuchChannelException,
com.sun.media.jsdt.NoSuchByteArrayException,
com.sun.media.jsdt.NoSuchTokenException,
com.sun.media.jsdt.NoSuchListenerException
-
enable certain events for this JSDT listener.
- Specified by:
- enableListenerEvents in interface com.sun.media.jsdt.Manageable
- Parameters:
listener
- the listener whose event mask is being changed.mask
- the mask of events to be enabled.- Throws:
- com.sun.media.jsdt.NoSuchSessionException - if this Session doesn't exist.
- com.sun.media.jsdt.NoSuchByteArrayException - if this ByteArray doesn't exist.
- com.sun.media.jsdt.NoSuchChannelException - if this Channel doesn't exist.
- com.sun.media.jsdt.NoSuchTokenException - if this Token doesn't exist.
- com.sun.media.jsdt.NoSuchListenerException - if this Listener doesn't exist.
disableListenerEvents
public void disableListenerEvents(java.util.EventListener listener,
int eventMask)
throws com.sun.media.jsdt.NoSuchSessionException,
com.sun.media.jsdt.NoSuchChannelException,
com.sun.media.jsdt.NoSuchByteArrayException,
com.sun.media.jsdt.NoSuchTokenException,
com.sun.media.jsdt.NoSuchListenerException
-
disable certain events for this JSDT listener.
- Specified by:
- disableListenerEvents in interface com.sun.media.jsdt.Manageable
- Parameters:
listener
- the listener whose event mask is being changed.mask
- the mask of events to be disabled.- Throws:
- com.sun.media.jsdt.NoSuchSessionException - if this Session doesn't exist.
- com.sun.media.jsdt.NoSuchByteArrayException - if this ByteArray doesn't exist.
- com.sun.media.jsdt.NoSuchChannelException - if this Channel doesn't exist.
- com.sun.media.jsdt.NoSuchTokenException - if this Token doesn't exist.
- com.sun.media.jsdt.NoSuchListenerException - if this Listener doesn't exist.
enableManagerEvents
public void enableManagerEvents(com.sun.media.jsdt.JSDTManager manager,
int eventMask)
throws com.sun.media.jsdt.ConnectionException,
com.sun.media.jsdt.NoSuchSessionException,
com.sun.media.jsdt.NoSuchChannelException,
com.sun.media.jsdt.NoSuchByteArrayException,
com.sun.media.jsdt.NoSuchTokenException,
com.sun.media.jsdt.NoSuchManagerException,
com.sun.media.jsdt.TimedOutException
-
enable certain events for the manager (if any) associated with this
manageable object.
- Specified by:
- enableManagerEvents in interface com.sun.media.jsdt.Manageable
- Parameters:
manager
- the manager whose event mask is being changed.mask
- the mask of events to be enabled.- Throws:
- com.sun.media.jsdt.ConnectionException - if a connection error occured.
- com.sun.media.jsdt.NoSuchSessionException - if this Session doesn't exist.
- com.sun.media.jsdt.NoSuchByteArrayException - if this ByteArray doesn't exist.
- com.sun.media.jsdt.NoSuchChannelException - if this Channel doesn't exist.
- com.sun.media.jsdt.NoSuchTokenException - if this Token doesn't exist.
- com.sun.media.jsdt.NoSuchManagerException - if this Manager doesn't exist.
- com.sun.media.jsdt.TimedOutException - if no reply was received for this operation
in the given timeout period.
disableManagerEvents
public void disableManagerEvents(com.sun.media.jsdt.JSDTManager manager,
int eventMask)
throws com.sun.media.jsdt.ConnectionException,
com.sun.media.jsdt.NoSuchSessionException,
com.sun.media.jsdt.NoSuchChannelException,
com.sun.media.jsdt.NoSuchByteArrayException,
com.sun.media.jsdt.NoSuchTokenException,
com.sun.media.jsdt.NoSuchManagerException,
com.sun.media.jsdt.TimedOutException
-
disable certain events for the manager (if any) associated with this
manageable object.
- Specified by:
- disableManagerEvents in interface com.sun.media.jsdt.Manageable
- Parameters:
manager
- the manager whose event mask is being changed.mask
- the mask of events to be disabled.- Throws:
- com.sun.media.jsdt.ConnectionException - if a connection error occured.
- com.sun.media.jsdt.NoSuchSessionException - if this Session doesn't exist.
- com.sun.media.jsdt.NoSuchByteArrayException - if this ByteArray doesn't exist.
- com.sun.media.jsdt.NoSuchChannelException - if this Channel doesn't exist.
- com.sun.media.jsdt.NoSuchTokenException - if this Token doesn't exist.
- com.sun.media.jsdt.NoSuchManagerException - if this Manager doesn't exist.
- com.sun.media.jsdt.TimedOutException - if no reply was received for this operation
in the given timeout period.
expel
public void expel(com.sun.media.jsdt.Client[] clients)
throws com.sun.media.jsdt.ConnectionException,
com.sun.media.jsdt.InvalidClientException,
com.sun.media.jsdt.NoSuchSessionException,
com.sun.media.jsdt.NoSuchChannelException,
com.sun.media.jsdt.NoSuchByteArrayException,
com.sun.media.jsdt.NoSuchClientException,
com.sun.media.jsdt.NoSuchTokenException,
com.sun.media.jsdt.PermissionDeniedException,
com.sun.media.jsdt.TimedOutException
-
expel Clients from this Manageable object.
This method should only be called by the manager for this object.
An indication is delivered to each listener of this Manageable object,
for each Client expelled.
- Specified by:
- expel in interface com.sun.media.jsdt.Manageable
- Parameters:
clients
- the list of Clients to be expelled from this
object.- Throws:
- com.sun.media.jsdt.ConnectionException - if a connection error occured.
- com.sun.media.jsdt.InvalidClientException - if the Client is invalid is some way (ie.
its getName() method returns null).
- com.sun.media.jsdt.NoSuchSessionException - if this Session doesn't exist.
- com.sun.media.jsdt.NoSuchByteArrayException - if this ByteArray doesn't exist.
- com.sun.media.jsdt.NoSuchClientException - if this Client doesn't exist.
- com.sun.media.jsdt.NoSuchChannelException - if this Channel doesn't exist.
- com.sun.media.jsdt.NoSuchTokenException - if this Token doesn't exist.
- com.sun.media.jsdt.PermissionDeniedException - if this Client doesn't have
permission for this operation.
- com.sun.media.jsdt.TimedOutException - if no reply was received for this operation
in the given timeout period.
invite
public void invite(com.sun.media.jsdt.Client[] clients)
throws com.sun.media.jsdt.ConnectionException,
com.sun.media.jsdt.InvalidClientException,
com.sun.media.jsdt.NoSuchSessionException,
com.sun.media.jsdt.NoSuchChannelException,
com.sun.media.jsdt.NoSuchByteArrayException,
com.sun.media.jsdt.NoSuchClientException,
com.sun.media.jsdt.NoSuchTokenException,
com.sun.media.jsdt.PermissionDeniedException,
com.sun.media.jsdt.TimedOutException
-
invite Clients to join this Manageable object.
This method should only be called by the manager for this object.
An indication is delivered to each listener of this Manageable object,
for each Client invited.
- Specified by:
- invite in interface com.sun.media.jsdt.Manageable
- Parameters:
clients
- the list of Clients to be invited to join this
object.- Throws:
- com.sun.media.jsdt.ConnectionException - if a connection error occured.
- com.sun.media.jsdt.InvalidClientException - if the Client is invalid is some way (ie.
its getName() method returns null).
- com.sun.media.jsdt.NoSuchSessionException - if this Session doesn't exist.
- com.sun.media.jsdt.NoSuchByteArrayException - if this ByteArray doesn't exist.
- com.sun.media.jsdt.NoSuchClientException - if this Client doesn't exist.
- com.sun.media.jsdt.NoSuchChannelException - if this Channel doesn't exist.
- com.sun.media.jsdt.NoSuchTokenException - if this Token doesn't exist.
- com.sun.media.jsdt.PermissionDeniedException - if this Client doesn't have
permission for this operation.
- com.sun.media.jsdt.TimedOutException - if no reply was received for this operation
in the given timeout period.
destroy
public void destroy(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.NoSuchChannelException,
com.sun.media.jsdt.NoSuchByteArrayException,
com.sun.media.jsdt.NoSuchClientException,
com.sun.media.jsdt.NoSuchTokenException,
com.sun.media.jsdt.PermissionDeniedException,
com.sun.media.jsdt.TimedOutException
-
destroy this Manageable object.
An indication is delivered to each listener of this Manageable object,
for each Client invited. If this is for a ByteArray, Channel or Token
in a managed Session, then the Client is authenticated to determine if
it is permitted to do this operation.
- Specified by:
- destroy in interface com.sun.media.jsdt.Manageable
- Parameters:
client
- the Client wishing to destroy this object.- Throws:
- com.sun.media.jsdt.ConnectionException - if a connection error occured.
- com.sun.media.jsdt.InvalidClientException - if the Client is invalid is some way (ie.
its getName() method returns null).
- com.sun.media.jsdt.NoSuchSessionException - if this Session doesn't exist.
- com.sun.media.jsdt.NoSuchChannelException - if this Channel doesn't exist.
- com.sun.media.jsdt.NoSuchByteArrayException - if this ByteArray doesn't exist.
- com.sun.media.jsdt.NoSuchClientException - if this Client doesn't exist.
- com.sun.media.jsdt.NoSuchTokenException - if this Token doesn't exist.
- com.sun.media.jsdt.PermissionDeniedException - if this Client doesn't have
permission for this operation.
- com.sun.media.jsdt.TimedOutException - if no reply was received for this operation
in the given timeout period.
isManaged
public boolean isManaged()
throws com.sun.media.jsdt.ConnectionException,
com.sun.media.jsdt.NoSuchSessionException,
com.sun.media.jsdt.NoSuchChannelException,
com.sun.media.jsdt.NoSuchByteArrayException,
com.sun.media.jsdt.NoSuchTokenException,
com.sun.media.jsdt.TimedOutException
-
test whether this managed object actually has a manager associated with it.
- Specified by:
- isManaged in interface com.sun.media.jsdt.Manageable
- Throws:
- com.sun.media.jsdt.ConnectionException - if a connection error occured.
- com.sun.media.jsdt.NoSuchSessionException - if this Session doesn't exist.
- com.sun.media.jsdt.NoSuchChannelException - if this Channel doesn't exist.
- com.sun.media.jsdt.NoSuchByteArrayException - if this ByteArray doesn't exist.
- com.sun.media.jsdt.NoSuchTokenException - if this Token doesn't exist.
- com.sun.media.jsdt.TimedOutException - if no reply was received for this operation
in the given timeout period.
join
public void join(com.sun.media.jsdt.Client client)
throws com.sun.media.jsdt.ConnectionException,
com.sun.media.jsdt.InvalidClientException,
com.sun.media.jsdt.NoSuchByteArrayException,
com.sun.media.jsdt.NoSuchChannelException,
com.sun.media.jsdt.NoSuchClientException,
com.sun.media.jsdt.NoSuchSessionException,
com.sun.media.jsdt.NoSuchTokenException,
com.sun.media.jsdt.PermissionDeniedException,
com.sun.media.jsdt.NameInUseException,
com.sun.media.jsdt.TimedOutException
-
join joins a client to this manageable object. This client will
now be known to this object. Listeners of this object will be sent an
indication, when this happens.
If this is a managed object, then the Client is authenticated to
determine if it is permitted to do this operation.
- Specified by:
- join in interface com.sun.media.jsdt.Manageable
- Parameters:
client
- the client in question.- Throws:
- com.sun.media.jsdt.ConnectionException - if a connection error occured.
- com.sun.media.jsdt.InvalidClientException - if the Client is invalid is some way (ie.
its getName() method returns null).
- com.sun.media.jsdt.NoSuchByteArrayException - if this byte array doesn't exist.
- com.sun.media.jsdt.NoSuchChannelException - if this channel doesn't exist.
- com.sun.media.jsdt.NoSuchClientException - if this client doesn't exist.
- com.sun.media.jsdt.NoSuchSessionException - if this session doesn't exist.
- com.sun.media.jsdt.NoSuchTokenException - if this token doesn't exist.
- com.sun.media.jsdt.PermissionDeniedException - if this client doesn't have
permission to do this operation.
- com.sun.media.jsdt.NameInUseException - if a Client with this name is already
joined to this Manageable object.
- com.sun.media.jsdt.TimedOutException - if no reply was received for this operation
in the given timeout period.
leave
public void leave(com.sun.media.jsdt.Client client)
throws com.sun.media.jsdt.ConnectionException,
com.sun.media.jsdt.InvalidClientException,
com.sun.media.jsdt.NoSuchByteArrayException,
com.sun.media.jsdt.NoSuchChannelException,
com.sun.media.jsdt.NoSuchClientException,
com.sun.media.jsdt.NoSuchSessionException,
com.sun.media.jsdt.NoSuchTokenException,
com.sun.media.jsdt.TimedOutException
-
leave removes a client from this manageable object. This client
will no longer be known to this object. Observers of this object will be
sent an indication when this happens.
- Specified by:
- leave in interface com.sun.media.jsdt.Manageable
- Parameters:
client
- the client in question.- Throws:
- com.sun.media.jsdt.ConnectionException - if a connection error occured.
- com.sun.media.jsdt.InvalidClientException - if the Client is invalid is some way (ie.
its getName() method returns null).
- com.sun.media.jsdt.NoSuchByteArrayException - if this byte array doesn't exist.
- com.sun.media.jsdt.NoSuchChannelException - if this channel doesn't exist.
- com.sun.media.jsdt.NoSuchClientException - if this client doesn't exist.
- com.sun.media.jsdt.NoSuchSessionException - if this session doesn't exist.
- com.sun.media.jsdt.NoSuchTokenException - if this token doesn't exist.
- com.sun.media.jsdt.TimedOutException - if no reply was received for this operation
in the given timeout period.
listClientNames
public java.lang.String[] listClientNames()
throws com.sun.media.jsdt.ConnectionException,
com.sun.media.jsdt.NoSuchSessionException,
com.sun.media.jsdt.NoSuchChannelException,
com.sun.media.jsdt.NoSuchByteArrayException,
com.sun.media.jsdt.NoSuchTokenException,
com.sun.media.jsdt.TimedOutException
-
listClientNames list the names of the clients who are joined
to this manageable object.
- Specified by:
- listClientNames in interface com.sun.media.jsdt.Manageable
- Returns:
- an array of names of clients currently joined to this object.
- Throws:
- com.sun.media.jsdt.ConnectionException - if a connection error occured.
- com.sun.media.jsdt.NoSuchByteArrayException - if this byte array doesn't exist.
- com.sun.media.jsdt.NoSuchChannelException - if this channel doesn't exist.
- com.sun.media.jsdt.NoSuchSessionException - if this session doesn't exist.
- com.sun.media.jsdt.NoSuchTokenException - if this token doesn't exist.
- com.sun.media.jsdt.TimedOutException - if no reply was received for this operation
in the given timeout period.