com.sun.media.jsdt.impl
Class ClientImpl

java.lang.Object
  |
  +--com.sun.media.jsdt.impl.JSDTObject
        |
        +--com.sun.media.jsdt.impl.ClientImpl
Direct Known Subclasses:
templateClient

public class ClientImpl
extends JSDTObject
implements com.sun.media.jsdt.Client

JSDT Client (implementation) class.

Version:
1.5 - 7th January 1999
Author:
Rich Burridge
See Also:
Serialized Form

Field Summary
static char M_Client
          To signify an object of type Client.
 
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
ClientImpl()
           ClientImpl the default constructor for the ClientImpl class.
ClientImpl(java.lang.String name, java.lang.Object check)
           ClientImpl the constructor for the ClientImpl class.
 
Method Summary
 java.lang.Object authenticate(com.sun.media.jsdt.AuthenticationInfo info)
           used to authenticate a Client for potentially joining a managed object, or creating or destroying a ByteArray, Channel or Token within a managed Session.
 java.util.Vector getByteArrays()
           getByteArrays get a vector of the byte arrays that this client is currently joined to.
 java.util.Vector getChannels()
           getChannels get a vector of the channels that this client is currently joined to.
 java.lang.Object getCheck()
           getCheck gets the object to use as a check this Client is not being spoofed.
 java.util.Hashtable getConsumers()
           getConsumers get a hashtable of the channel consumers associated with this client.
 com.sun.media.jsdt.event.ClientListener getListener()
           getListener returns the client listener associated with this invitable client.
 java.lang.String getName()
           get the name of this Client.
 java.util.Vector getTokens()
           getTokens get a vector of the tokens that this client is currently joined to.
 void setClientAndListener(com.sun.media.jsdt.Client client, com.sun.media.jsdt.event.ClientListener listener)
           setClientAndListener set the Client and Listener associated with this invitable Client.
 
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

M_Client

public static final char M_Client
To signify an object of type Client.
Constructor Detail

ClientImpl

public ClientImpl()
ClientImpl the default constructor for the ClientImpl class.

ClientImpl

public ClientImpl(java.lang.String name,
                  java.lang.Object check)
ClientImpl the constructor for the ClientImpl class.
Parameters:
name - the name of the client being constructed.
check - object to use as check that this Client is not being spoofed. This is implementation specific.
Method Detail

authenticate

public java.lang.Object authenticate(com.sun.media.jsdt.AuthenticationInfo info)
used to authenticate a Client for potentially joining a managed object, or creating or destroying a ByteArray, Channel or Token within a managed Session. The ByteArray, Channel, Session or Token manager will be doing this Client validation.

The manager sends the Client an authentication request. Within this request is a challenge. The Client replies with a response. This response is validated by the manager and determines if the Client will be allowed to join the ByteArray/Channel/Session/Token or create/destroy the ByteArray/Channel/Token.

The challenge given by the manager and the response provided by the Client are both Java objects. There must be some agreed policy between the manager and the Client with regards to these objects. In other words the Client needs to know what to do with the challenge and how to respond to it, and the manager needs to know how to handle that response.

Specified by:
authenticate in interface com.sun.media.jsdt.Client
Parameters:
info - the authentication information. This object needs to be serializable.
Returns:
the response by the Client to the managers challenge.

getName

public java.lang.String getName()
get the name of this Client.
Specified by:
getName in interface com.sun.media.jsdt.Client
Returns:
the name of the Client.

getCheck

public java.lang.Object getCheck()
getCheck gets the object to use as a check this Client is not being spoofed. This is implementation specific.
Returns:
the object to use as a check this Client is not being spoofed. joined to.

getByteArrays

public java.util.Vector getByteArrays()
getByteArrays get a vector of the byte arrays that this client is currently joined to.
Returns:
a Vector containing the byte arrays that this client is currently joined to.

getChannels

public java.util.Vector getChannels()
getChannels get a vector of the channels that this client is currently joined to.
Returns:
a Vector containing the channels that this client is currently joined to.

getConsumers

public java.util.Hashtable getConsumers()
getConsumers get a hashtable of the channel consumers associated with this client.
Returns:
a Hashtable containing the channel consumers for this client.

getTokens

public java.util.Vector getTokens()
getTokens get a vector of the tokens that this client is currently joined to.
Returns:
a Vector containing the tokens that this client is currently joined to.

setClientAndListener

public void setClientAndListener(com.sun.media.jsdt.Client client,
                                 com.sun.media.jsdt.event.ClientListener listener)
setClientAndListener set the Client and Listener associated with this invitable Client.
Parameters:
client - the client to use for authentication purposes.
listener - the listener to send ClientEvents too.

getListener

public com.sun.media.jsdt.event.ClientListener getListener()
getListener returns the client listener associated with this invitable client.
Returns:
the client listener associated with this invitable client, or null if there isn't one assigned.