com.sun.media.jsdt
Interface Manageable

All Known Subinterfaces:
ByteArray, Channel, Session, Token

public abstract interface Manageable
extends java.io.Serializable

The Manageable interface. This is the interface definition that is the parent for all manageable resources (ByteArrays, Channels, Sessions and Tokens).

Since:
JSDT 1.0
Version:
1.5 - 7th January 1999
Author:
Rich Burridge

Fields inherited from class java.io.Serializable
serialVersionUID
 
Method Summary
 void destroy(Client client)
           destroy this Manageable object.
 void disableListenerEvents(java.util.EventListener listener, int eventMask)
           disable certain events for this JSDT listener.
 void disableManagerEvents(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(JSDTManager manager, int eventMask)
           enable certain events for the manager (if any) associated with this manageable object.
 void expel(Client[] clients)
           expel Clients from this Manageable object.
 java.lang.String getName()
           get the name of this object.
 Session getSession()
           get the name of the Session that this manageable object belongs to.
 void invite(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(Client client)
           join a Client to this Manageable object.
 void leave(Client client)
           removes a Client from this Manageable object.
 java.lang.String[] listClientNames()
           list the names of the Clients who are joined to this Manageable object.
 

Method Detail

getName

public java.lang.String getName()
get the name of this object.
Returns:
the name of this object.

getSession

public 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.
Returns:
the name of the Session that this manageable object belongs to.
Since:
JSDT 1.4

enableListenerEvents

public void enableListenerEvents(java.util.EventListener listener,
                                 int eventMask)
                          throws NoSuchSessionException,
                                 NoSuchChannelException,
                                 NoSuchByteArrayException,
                                 NoSuchTokenException,
                                 NoSuchListenerException
enable certain events for this JSDT listener.
Parameters:
listener - the listener whose event mask is being changed.
mask - the mask of events to be enabled.
Throws:
NoSuchSessionException - if this Session doesn't exist.
NoSuchByteArrayException - if this ByteArray doesn't exist.
NoSuchChannelException - if this Channel doesn't exist.
NoSuchTokenException - if this Token doesn't exist.
NoSuchListenerException - if this Listener doesn't exist.

disableListenerEvents

public void disableListenerEvents(java.util.EventListener listener,
                                  int eventMask)
                           throws NoSuchSessionException,
                                  NoSuchChannelException,
                                  NoSuchByteArrayException,
                                  NoSuchTokenException,
                                  NoSuchListenerException
disable certain events for this JSDT listener.
Parameters:
listener - the listener whose event mask is being changed.
mask - the mask of events to be disabled.
Throws:
NoSuchSessionException - if this Session doesn't exist.
NoSuchByteArrayException - if this ByteArray doesn't exist.
NoSuchChannelException - if this Channel doesn't exist.
NoSuchTokenException - if this Token doesn't exist.
NoSuchListenerException - if this Listener doesn't exist.

enableManagerEvents

public void enableManagerEvents(JSDTManager manager,
                                int eventMask)
                         throws ConnectionException,
                                NoSuchSessionException,
                                NoSuchChannelException,
                                NoSuchByteArrayException,
                                NoSuchTokenException,
                                NoSuchManagerException,
                                TimedOutException
enable certain events for the manager (if any) associated with this manageable object.
Parameters:
manager - the manager whose event mask is being changed.
mask - the mask of events to be enabled.
Throws:
ConnectionException - if a connection error occured.
NoSuchSessionException - if this Session doesn't exist.
NoSuchByteArrayException - if this ByteArray doesn't exist.
NoSuchChannelException - if this Channel doesn't exist.
NoSuchTokenException - if this Token doesn't exist.
NoSuchManagerException - if this Manager doesn't exist.
TimedOutException - if no reply was received for this operation in the given timeout period.
Since:
JSDT 1.5

disableManagerEvents

public void disableManagerEvents(JSDTManager manager,
                                 int eventMask)
                          throws ConnectionException,
                                 NoSuchSessionException,
                                 NoSuchChannelException,
                                 NoSuchByteArrayException,
                                 NoSuchTokenException,
                                 NoSuchManagerException,
                                 TimedOutException
disable certain events for the manager (if any) associated with this manageable object.
Parameters:
manager - the manager whose event mask is being changed.
mask - the mask of events to be disabled.
Throws:
ConnectionException - if a connection error occured.
NoSuchSessionException - if this Session doesn't exist.
NoSuchByteArrayException - if this ByteArray doesn't exist.
NoSuchChannelException - if this Channel doesn't exist.
NoSuchTokenException - if this Token doesn't exist.
NoSuchManagerException - if this Manager doesn't exist.
TimedOutException - if no reply was received for this operation in the given timeout period.
Since:
JSDT 1.5

expel

public void expel(Client[] clients)
           throws ConnectionException,
                  InvalidClientException,
                  NoSuchSessionException,
                  NoSuchChannelException,
                  NoSuchByteArrayException,
                  NoSuchClientException,
                  NoSuchTokenException,
                  PermissionDeniedException,
                  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.

Parameters:
clients - the list of Clients to be expelled from this object.
Throws:
ConnectionException - if a connection error occured.
InvalidClientException - if the Client is invalid is some way (ie. its getName() method returns null).
NoSuchSessionException - if this Session doesn't exist.
NoSuchByteArrayException - if this ByteArray doesn't exist.
NoSuchClientException - if this Client doesn't exist.
NoSuchChannelException - if this Channel doesn't exist.
NoSuchTokenException - if this Token doesn't exist.
PermissionDeniedException - if this Client doesn't have permission for this operation.
TimedOutException - if no reply was received for this operation in the given timeout period.

invite

public void invite(Client[] clients)
            throws ConnectionException,
                   InvalidClientException,
                   NoSuchSessionException,
                   NoSuchChannelException,
                   NoSuchByteArrayException,
                   NoSuchClientException,
                   NoSuchTokenException,
                   PermissionDeniedException,
                   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.

Parameters:
clients - the list of Clients to be invited to join this object.
Throws:
ConnectionException - if a connection error occured.
InvalidClientException - if the Client is invalid is some way (ie. its getName() method returns null).
NoSuchSessionException - if this Session doesn't exist.
NoSuchByteArrayException - if this ByteArray doesn't exist.
NoSuchClientException - if this Client doesn't exist.
NoSuchChannelException - if this Channel doesn't exist.
NoSuchTokenException - if this Token doesn't exist.
PermissionDeniedException - if this Client doesn't have permission for this operation.
TimedOutException - if no reply was received for this operation in the given timeout period.

destroy

public void destroy(Client client)
             throws ConnectionException,
                    InvalidClientException,
                    NoSuchSessionException,
                    NoSuchChannelException,
                    NoSuchByteArrayException,
                    NoSuchClientException,
                    NoSuchTokenException,
                    PermissionDeniedException,
                    TimedOutException
destroy this Manageable object.

An indication is delivered to each listener of this Manageable object, that it has been destroyed. 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.

Parameters:
client - the Client wishing to destroy this object.
Throws:
ConnectionException - if a connection error occured.
InvalidClientException - if the Client is invalid is some way (ie. its getName() method returns null).
NoSuchSessionException - if this Session doesn't exist.
NoSuchChannelException - if this Channel doesn't exist.
NoSuchByteArrayException - if this ByteArray doesn't exist.
NoSuchClientException - if this Client doesn't exist.
NoSuchTokenException - if this Token doesn't exist.
PermissionDeniedException - if this Client doesn't have permission for this operation.
TimedOutException - if no reply was received for this operation in the given timeout period.

isManaged

public boolean isManaged()
                  throws ConnectionException,
                         NoSuchSessionException,
                         NoSuchChannelException,
                         NoSuchByteArrayException,
                         NoSuchTokenException,
                         TimedOutException
test whether this managed object actually has a manager associated with it.
Returns:
whether this managed object has a manager associated with it.
Throws:
ConnectionException - if a connection error occured.
NoSuchSessionException - if this Session doesn't exist.
NoSuchChannelException - if this Channel doesn't exist.
NoSuchByteArrayException - if this ByteArray doesn't exist.
NoSuchTokenException - if this Token doesn't exist.
TimedOutException - if no reply was received for this operation in the given timeout period.
Since:
JSDT 1.3

join

public void join(Client client)
          throws ConnectionException,
                 InvalidClientException,
                 NoSuchByteArrayException,
                 NoSuchChannelException,
                 NoSuchClientException,
                 NoSuchSessionException,
                 NoSuchTokenException,
                 PermissionDeniedException,
                 NameInUseException,
                 TimedOutException
join a Client to this Manageable object.

If this is a managed object, then the Client is authenticated to determine if it is permitted to do this operation.

Parameters:
client - the Client wishing to join this Manageable object.
Throws:
ConnectionException - if a connection error occured.
InvalidClientException - if the Client is invalid is some way (ie. its getName() method returns null).
NoSuchByteArrayException - if this ByteArray doesn't exist.
NoSuchChannelException - if this Channel doesn't exist.
NoSuchClientException - if this Client doesn't exist.
NoSuchSessionException - if this Session doesn't exist.
NoSuchTokenException - if this Token doesn't exist.
PermissionDeniedException - if this Client doesn't have permission for this operation.
NameInUseException - if a Client with this name is already joined to this Manageable object.
TimedOutException - if no reply was received for this operation in the given timeout period.

leave

public void leave(Client client)
           throws ConnectionException,
                  InvalidClientException,
                  NoSuchByteArrayException,
                  NoSuchChannelException,
                  NoSuchClientException,
                  NoSuchSessionException,
                  NoSuchTokenException,
                  TimedOutException
removes a Client from this Manageable object. This Client will no longer be known to this object. Listeners of this object will be sent an indication when this happens.
Parameters:
client - the Client in question.
Throws:
ConnectionException - if a connection error occured.
InvalidClientException - if the Client is invalid is some way (ie. its getName() method returns null).
NoSuchByteArrayException - if this ByteArray doesn't exist.
NoSuchChannelException - if this Channel doesn't exist.
NoSuchClientException - if this Client doesn't exist.
NoSuchSessionException - if this Session doesn't exist.
NoSuchTokenException - if this Token doesn't exist.
TimedOutException - if no reply was received for this operation in the given timeout period.

listClientNames

public java.lang.String[] listClientNames()
                                   throws ConnectionException,
                                          NoSuchSessionException,
                                          NoSuchChannelException,
                                          NoSuchByteArrayException,
                                          NoSuchTokenException,
                                          TimedOutException
list the names of the Clients who are joined to this Manageable object.
Returns:
a sorted array of names of Clients currently joined to this object.
Throws:
ConnectionException - if a connection error occured.
NoSuchByteArrayException - if this ByteArray doesn't exist.
NoSuchChannelException - if this Channel doesn't exist.
NoSuchSessionException - if this Session doesn't exist.
NoSuchTokenException - if this Token doesn't exist.
TimedOutException - if no reply was received for this operation in the given timeout period.