org.jlab.coda.cMsg.TCPSDomain
Class TCPS

java.lang.Object
  extended by org.jlab.coda.cMsg.cMsgDomainAdapter
      extended by org.jlab.coda.cMsg.TCPSDomain.TCPS
All Implemented Interfaces:
cMsgDomainInterface

public class TCPS
extends cMsgDomainAdapter

This class implements a cMsg client in the TCPServer (or TCPS) domain.

Version:
1.0
Author:
Carl Timmer

Field Summary
 
Fields inherited from class org.jlab.coda.cMsg.cMsgDomainAdapter
connected, description, domain, host, name, receiving, shutdownHandler, UDL, UDLremainder
 
Constructor Summary
TCPS()
          Constructor.
 
Method Summary
 void connect()
          Method to connect to the TCPServer from this client.
 void disconnect()
          Method to close the connection to the tcpServer.
 void send(cMsgMessage message)
          Method to send a message/command to the TCPServer.
 
Methods inherited from class org.jlab.coda.cMsg.cMsgDomainAdapter
flush, getDescription, getDomain, getHost, getName, getShutdownHandler, getString, getUDL, getUDLRemainder, isConnected, isReceiving, monitor, sendAndGet, setDescription, setName, setShutdownHandler, setUDL, setUDLRemainder, shutdownClients, shutdownServers, start, stop, subscribe, subscribeAndGet, syncSend, unsubscribe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TCPS

public TCPS()
Constructor.

Method Detail

connect

public void connect()
             throws cMsgException
Method to connect to the TCPServer from this client.

Specified by:
connect in interface cMsgDomainInterface
Overrides:
connect in class cMsgDomainAdapter
Throws:
cMsgException - if there are problems parsing the UDL or communication problems with the server(s)

disconnect

public void disconnect()
Method to close the connection to the tcpServer. This method results in this object becoming functionally useless.

Specified by:
disconnect in interface cMsgDomainInterface
Overrides:
disconnect in class cMsgDomainAdapter

send

public void send(cMsgMessage message)
          throws cMsgException
Method to send a message/command to the TCPServer. The command is sent as a string in the message's text field.

Specified by:
send in interface cMsgDomainInterface
Overrides:
send in class cMsgDomainAdapter
Parameters:
message - message to send
Throws:
cMsgException - if there are communication problems with the server; text is null or blank