| java.lang.Object org.datashare.client.DataShareClient
DataShareClient | public class DataShareClient implements ClientDataReceiverInterface(Code) | | This class will provide the methods necessary to establish the commandStatusChannel
to a DataShare server, activate it, and create a data channel for sharing data (no history).
The parent class needs to provide the server, the commandStatusPort,
a user name, password, an enterprise (for organizing clients/sessions if there are lots),
a session name/description, and a channel name/description/type.
|
Method Summary | |
public void | connectionLost(DataShareConnection dsc) this method is called when the commandStatusConnection has been lost,
this will be used to notify anybody that cares... | public void | dataReceived(DataShareObject dso) | public void | initialize(DataShareClientInterface rci, InetAddress serverInetAddress, int serverCommandStatusPort, String sessionName, String sessionDescription, String userName, String password, String publicInfo, String enterpriseName, String channelName, String channelDescription, int channelType) | public void | registerForUpdates(boolean allChanges) call this method if you want to be notified when clients/sessions come and go via
the updateReceived() method. | public void | requestNewTreeNodes() call this if you want the server to send a full tree. | public void | sendDataToAll(Object object) | public void | sendDataToClient(Object object, String destinationClientKey) | public void | sendDataToOthers(Object object) | public void | shutDown() |
DataShareClient | public DataShareClient()(Code) | | Constructor
|
connectionLost | public void connectionLost(DataShareConnection dsc)(Code) | | this method is called when the commandStatusConnection has been lost,
this will be used to notify anybody that cares...
|
dataReceived | public void dataReceived(DataShareObject dso)(Code) | | this method will be called when data is received on our commandStatus connection
|
initialize | public void initialize(DataShareClientInterface rci, InetAddress serverInetAddress, int serverCommandStatusPort, String sessionName, String sessionDescription, String userName, String password, String publicInfo, String enterpriseName, String channelName, String channelDescription, int channelType)(Code) | | causes connections to DataShareServer to be established
Parameters: channelType - must be ChannelDescription.MULTICAST, ChannelDescription.TCP, orChannelDescription.UDP |
registerForUpdates | public void registerForUpdates(boolean allChanges)(Code) | | call this method if you want to be notified when clients/sessions come and go via
the updateReceived() method.
|
requestNewTreeNodes | public void requestNewTreeNodes()(Code) | | call this if you want the server to send a full tree. The tree type will be based on the last
call to registerForUpdates().
|
sendDataToAll | public void sendDataToAll(Object object)(Code) | | Use this method to send an object to everybody in a Channel (including our instance)
|
sendDataToClient | public void sendDataToClient(Object object, String destinationClientKey)(Code) | | Use this method to send an object to one client in a Channel
|
sendDataToOthers | public void sendDataToOthers(Object object)(Code) | | Use this method to send an object to everybody in a Channel (excluding our instance)
|
shutDown | public void shutDown()(Code) | | this method is called when this instance is supposed to clean up and shutdown
|
|
|