| java.lang.Object org.datashare.DataReceiverAdapter
DataReceiverAdapter | public class DataReceiverAdapter implements DataReceiverInterface(Code) | | Implements the standard behavior we expect for DataShare connections on the
server side, including taking care of activating the connection (initiated by the client
sending the ActivateConnectionObject) and automatically sending any received data to
the specified recipients. This Adapter is only suitable for the DataShare function
Channels, not the commandStatus connection. There is one instance of this class
for every function/channel, not one for every consumer.
author: Charles Wood version: 1.0 |
Field Summary | |
public Hashtable | allMySocketHandlers table of SocketServers, indexed by clientKey (cannot have two connections from same client on
same connection). | protected int | sequence |
allMySocketHandlers | public Hashtable allMySocketHandlers(Code) | | table of SocketServers, indexed by clientKey (cannot have two connections from same client on
same connection). This is populated by displaying the consumer.
|
sequence | protected int sequence(Code) | | provides the sequence for the Data objects, incremented as they are created, first data
object has sequence number of zero
|
connectionActivated | public synchronized void connectionActivated(SocketAdapter ts, ActivateConnectionObject aco)(Code) | | called when a client 'activates' this ThreadedSocket
for Multicast, we will have multiple copies of same socket
|
connectionLost | public void connectionLost(SocketAdapter ts)(Code) | | This is called through the DataReceiverInterface when the connection has been lost/closed
so that the connection may be removed from our tables and other clients notified
|
findConsumerSocket | public SocketAdapter findConsumerSocket(ConsumerInfo ci)(Code) | | tries to find the socket for a particular consumer, returns null if not successful
|
getChannelDatabaseKey | public String getChannelDatabaseKey()(Code) | | retrieves the channelDatabaseKey for this channel
|
getChannelKey | public String getChannelKey()(Code) | | returns the key for this instance's Channel
|
getNextPort | public int getNextPort()(Code) | | returns the next port to use for a connection
|
lostServerSocket | public void lostServerSocket(String keyValue)(Code) | | called when we loose our ServerSocket, need to figure out what to do about it...
|
removeAllConsumerConnections | public void removeAllConsumerConnections()(Code) | | call this when all consumers need to be removed...takes care to close the connection,
|
removeConsumerConnection | public void removeConsumerConnection(String clientKeyValue)(Code) | | call this when a consumer needs to be removed...takes care to close the connection
|
setChannelDatabaseKey | public void setChannelDatabaseKey(String channelDatabaseKey)(Code) | | sets the channelDatabaseKey for this channel
|
setChannelInfo | public void setChannelInfo(ChannelInfo channelInfo)(Code) | | must be set after constructor called
|
setSessionInfo | public void setSessionInfo(SessionInfo sessionInfo)(Code) | | must be set after constructor called
|
stopAllConnectionsAndThreads | public void stopAllConnectionsAndThreads()(Code) | | attempts to close all connections and stop all Threads associated with our Channel.
This should only be called prior to exiting as it is not guaranteed to be the most
graceful way to shutdown.
|
|
|