org.jlab.coda.cMsg.subdomains
Class TcpServer

java.lang.Object
  extended by org.jlab.coda.cMsg.cMsgSubdomainAdapter
      extended by org.jlab.coda.cMsg.subdomains.TcpServer
All Implemented Interfaces:
cMsgSubdomainInterface

public class TcpServer
extends cMsgSubdomainAdapter

cMsg subdomain handler to access tcpserver processes UDL: cMsg:cMsg://host:port/TcpServer/srvHost:srvPort

Version:
1.0
Author:
Elliott Wolin

Constructor Summary
TcpServer()
           
 
Method Summary
 void handleSendAndGetRequest(cMsgMessageFull msg)
          Sends text string to server to execute, returns result.
 boolean hasSendAndGet()
          Method to tell if the "sendAndGet" cMsg API function is implemented by this interface implementation in the handleSendAndGetRequest(org.jlab.coda.cMsg.cMsgMessageFull) method.
 void registerClient(cMsgClientInfo info)
          Method to register domain client.
 void setMessageDeliverer(cMsgDeliverMessageInterface deliverer)
          Method to give the subdomain handler on object able to deliver messages to the client.
 void setUDLRemainder(java.lang.String UDLRemainder)
          Method to give the subdomain handler the appropriate part of the UDL the client used to talk to the domain server.
 
Methods inherited from class org.jlab.coda.cMsg.cMsgSubdomainAdapter
handleClientShutdown, handleKeepAlive, handleSendRequest, handleShutdownClientsRequest, handleSubscribeAndGetRequest, handleSubscribeRequest, handleSyncSendRequest, handleUnSendAndGetRequest, handleUnsubscribeAndGetRequest, handleUnsubscribeRequest, hasSend, hasShutdown, hasSubscribe, hasSubscribeAndGet, hasSyncSend, hasUnsubscribe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TcpServer

public TcpServer()
Method Detail

hasSendAndGet

public boolean hasSendAndGet()
Method to tell if the "sendAndGet" cMsg API function is implemented by this interface implementation in the handleSendAndGetRequest(org.jlab.coda.cMsg.cMsgMessageFull) method.

Specified by:
hasSendAndGet in interface cMsgSubdomainInterface
Overrides:
hasSendAndGet in class cMsgSubdomainAdapter
Returns:
true if sendAndGet implemented in handleSendAndGetRequest(org.jlab.coda.cMsg.cMsgMessageFull)

setUDLRemainder

public void setUDLRemainder(java.lang.String UDLRemainder)
                     throws cMsgException
Method to give the subdomain handler the appropriate part of the UDL the client used to talk to the domain server.

Specified by:
setUDLRemainder in interface cMsgSubdomainInterface
Overrides:
setUDLRemainder in class cMsgSubdomainAdapter
Parameters:
UDLRemainder - last part of the UDL appropriate to the subdomain handler
Throws:
cMsgException

setMessageDeliverer

public void setMessageDeliverer(cMsgDeliverMessageInterface deliverer)
                         throws cMsgException
Method to give the subdomain handler on object able to deliver messages to the client.

Specified by:
setMessageDeliverer in interface cMsgSubdomainInterface
Overrides:
setMessageDeliverer in class cMsgSubdomainAdapter
Parameters:
deliverer - object able to deliver messages to the client
Throws:
cMsgException

registerClient

public void registerClient(cMsgClientInfo info)
                    throws cMsgException
Method to register domain client. Connects to tcpserver.

Specified by:
registerClient in interface cMsgSubdomainInterface
Overrides:
registerClient in class cMsgSubdomainAdapter
Parameters:
info - information about client
Throws:
cMsgException - if unable to register

handleSendAndGetRequest

public void handleSendAndGetRequest(cMsgMessageFull msg)
                             throws cMsgException
Sends text string to server to execute, returns result. Uses stateless transaction.

Specified by:
handleSendAndGetRequest in interface cMsgSubdomainInterface
Overrides:
handleSendAndGetRequest in class cMsgSubdomainAdapter
Parameters:
msg - message requesting what sort of message to get
Throws:
cMsgException