org.jlab.coda.cMsg.subdomains
Class Dummy

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

public class Dummy
extends cMsgSubdomainAdapter

This class is a subdomain which does nothing. It was used for finding a memory leak in the cMsg server.


Constructor Summary
Dummy()
           
 
Method Summary
 void handleClientShutdown()
          Method to handle a client or domain server down.
 void handleKeepAlive()
          Method to handle keepalive sent by domain client checking to see if the domain server socket is still up.
 void handleSendAndGetRequest(cMsgMessageFull message)
          Method to synchronously get a single message from a receiver by sending out a message to be responded to.
 void handleSendRequest(cMsgMessageFull message)
          Method to handle message sent by domain client.
 void handleShutdownClientsRequest(java.lang.String client, boolean includeMe)
          Method to handle request to shutdown clients sent by domain client.
 void handleSubscribeAndGetRequest(java.lang.String subject, java.lang.String type, int id)
          Method to synchronously get a single message from the server for a one-time subscription of a subject and type.
 void handleSubscribeRequest(java.lang.String subject, java.lang.String type, int id)
          Method to handle subscribe request sent by domain client.
 int handleSyncSendRequest(cMsgMessageFull message)
          Method to handle message sent by domain client in synchronous mode.
 void handleUnSendAndGetRequest(int id)
          Method to handle remove sendAndGet request sent by domain client (hidden from user).
 void handleUnsubscribeAndGetRequest(java.lang.String subject, java.lang.String type, int id)
          Method to handle remove subscribeAndGet request sent by domain client (hidden from user).
 void handleUnsubscribeRequest(java.lang.String subject, java.lang.String type, int id)
          Method to handle unsubscribe request sent by domain client.
 boolean hasSend()
          Method to tell if the "send" cMsg API function is implemented by this interface implementation in the handleSendRequest(org.jlab.coda.cMsg.cMsgMessageFull) method.
 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.
 boolean hasShutdown()
          Method to tell if the "shutdown" cMsg API function is implemented by this interface implementation in the handleShutdownClientsRequest(java.lang.String, boolean) method.
 boolean hasSubscribe()
          Method to tell if the "subscribe" cMsg API function is implemented by this interface implementation in the handleSubscribeRequest(java.lang.String, java.lang.String, int) method.
 boolean hasSubscribeAndGet()
          Method to tell if the "subscribeAndGet" cMsg API function is implemented by this interface implementation in the handleSubscribeAndGetRequest(java.lang.String, java.lang.String, int) method.
 boolean hasSyncSend()
          Method to tell if the "syncSend" cMsg API function is implemented by this interface implementation in the handleSyncSendRequest(org.jlab.coda.cMsg.cMsgMessageFull) method.
 boolean hasUnsubscribe()
          Method to tell if the "unsubscribe" cMsg API function is implemented by this interface implementation in the handleUnsubscribeRequest(java.lang.String, java.lang.String, int) 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dummy

public Dummy()
Method Detail

setUDLRemainder

public 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.

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

setMessageDeliverer

public void setMessageDeliverer(cMsgDeliverMessageInterface deliverer)
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

registerClient

public void registerClient(cMsgClientInfo info)
Method to register domain client.

Specified by:
registerClient in interface cMsgSubdomainInterface
Overrides:
registerClient in class cMsgSubdomainAdapter
Parameters:
info - information about client

handleSendRequest

public void handleSendRequest(cMsgMessageFull message)
Method to handle message sent by domain client.

Specified by:
handleSendRequest in interface cMsgSubdomainInterface
Overrides:
handleSendRequest in class cMsgSubdomainAdapter
Parameters:
message - message from sender

handleSyncSendRequest

public int handleSyncSendRequest(cMsgMessageFull message)
Method to handle message sent by domain client in synchronous mode. It requries an integer response from the subdomain handler.

Specified by:
handleSyncSendRequest in interface cMsgSubdomainInterface
Overrides:
handleSyncSendRequest in class cMsgSubdomainAdapter
Parameters:
message - message from sender
Returns:
0

handleSubscribeAndGetRequest

public void handleSubscribeAndGetRequest(java.lang.String subject,
                                         java.lang.String type,
                                         int id)
Method to synchronously get a single message from the server for a one-time subscription of a subject and type.

Specified by:
handleSubscribeAndGetRequest in interface cMsgSubdomainInterface
Overrides:
handleSubscribeAndGetRequest in class cMsgSubdomainAdapter
Parameters:
subject - message subject subscribed to
type - message type subscribed to
id - message id refering to these specific subject and type values

handleSendAndGetRequest

public void handleSendAndGetRequest(cMsgMessageFull message)
Method to synchronously get a single message from a receiver by sending out a message to be responded to.

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

handleUnSendAndGetRequest

public void handleUnSendAndGetRequest(int id)
Method to handle remove sendAndGet request sent by domain client (hidden from user).

Specified by:
handleUnSendAndGetRequest in interface cMsgSubdomainInterface
Overrides:
handleUnSendAndGetRequest in class cMsgSubdomainAdapter
Parameters:
id - message id refering to these specific subject and type values

handleUnsubscribeAndGetRequest

public void handleUnsubscribeAndGetRequest(java.lang.String subject,
                                           java.lang.String type,
                                           int id)
Method to handle remove subscribeAndGet request sent by domain client (hidden from user).

Specified by:
handleUnsubscribeAndGetRequest in interface cMsgSubdomainInterface
Overrides:
handleUnsubscribeAndGetRequest in class cMsgSubdomainAdapter
Parameters:
subject - message subject subscribed to
type - message type subscribed to
id - message id refering to these specific subject and type values

handleSubscribeRequest

public void handleSubscribeRequest(java.lang.String subject,
                                   java.lang.String type,
                                   int id)
Method to handle subscribe request sent by domain client.

Specified by:
handleSubscribeRequest in interface cMsgSubdomainInterface
Overrides:
handleSubscribeRequest in class cMsgSubdomainAdapter
Parameters:
subject - message subject to subscribe to
type - message type to subscribe to
id - message id refering to these specific subject and type values

handleUnsubscribeRequest

public void handleUnsubscribeRequest(java.lang.String subject,
                                     java.lang.String type,
                                     int id)
Method to handle unsubscribe request sent by domain client.

Specified by:
handleUnsubscribeRequest in interface cMsgSubdomainInterface
Overrides:
handleUnsubscribeRequest in class cMsgSubdomainAdapter
Parameters:
subject - message subject to subscribe to
type - message type to subscribe to
id - message id refering to these specific subject and type values

handleShutdownClientsRequest

public void handleShutdownClientsRequest(java.lang.String client,
                                         boolean includeMe)
Method to handle request to shutdown clients sent by domain client.

Specified by:
handleShutdownClientsRequest in interface cMsgSubdomainInterface
Overrides:
handleShutdownClientsRequest in class cMsgSubdomainAdapter
Parameters:
client - client(s) to be shutdown
includeMe - if true, this client may be shutdown too

handleKeepAlive

public void handleKeepAlive()
Method to handle keepalive sent by domain client checking to see if the domain server socket is still up.

Specified by:
handleKeepAlive in interface cMsgSubdomainInterface
Overrides:
handleKeepAlive in class cMsgSubdomainAdapter

handleClientShutdown

public void handleClientShutdown()
Method to handle a client or domain server down.

Specified by:
handleClientShutdown in interface cMsgSubdomainInterface
Overrides:
handleClientShutdown in class cMsgSubdomainAdapter

hasSend

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

Specified by:
hasSend in interface cMsgSubdomainInterface
Overrides:
hasSend in class cMsgSubdomainAdapter
Returns:
true

hasSyncSend

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

Specified by:
hasSyncSend in interface cMsgSubdomainInterface
Overrides:
hasSyncSend in class cMsgSubdomainAdapter
Returns:
true

hasSubscribeAndGet

public boolean hasSubscribeAndGet()
Method to tell if the "subscribeAndGet" cMsg API function is implemented by this interface implementation in the handleSubscribeAndGetRequest(java.lang.String, java.lang.String, int) method.

Specified by:
hasSubscribeAndGet in interface cMsgSubdomainInterface
Overrides:
hasSubscribeAndGet in class cMsgSubdomainAdapter
Returns:
true

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

hasSubscribe

public boolean hasSubscribe()
Method to tell if the "subscribe" cMsg API function is implemented by this interface implementation in the handleSubscribeRequest(java.lang.String, java.lang.String, int) method.

Specified by:
hasSubscribe in interface cMsgSubdomainInterface
Overrides:
hasSubscribe in class cMsgSubdomainAdapter
Returns:
true

hasUnsubscribe

public boolean hasUnsubscribe()
Method to tell if the "unsubscribe" cMsg API function is implemented by this interface implementation in the handleUnsubscribeRequest(java.lang.String, java.lang.String, int) method.

Specified by:
hasUnsubscribe in interface cMsgSubdomainInterface
Overrides:
hasUnsubscribe in class cMsgSubdomainAdapter
Returns:
true

hasShutdown

public boolean hasShutdown()
Method to tell if the "shutdown" cMsg API function is implemented by this interface implementation in the handleShutdownClientsRequest(java.lang.String, boolean) method.

Specified by:
hasShutdown in interface cMsgSubdomainInterface
Overrides:
hasShutdown in class cMsgSubdomainAdapter
Returns:
true