public class SmartSockets extends cMsgSubdomainAdapter
UDL: cMsg:cMsg://host:port/SmartSockets/projectName
Constructor and Description |
---|
SmartSockets() |
Modifier and Type | Method and Description |
---|---|
void |
handleClientShutdown()
Close connection to smartsockets server.
|
void |
handleSendRequest(cMsgMessageFull msg)
Forwards message to smartsockets system.
|
void |
handleSubscribeRequest(java.lang.String subject,
java.lang.String type,
int id)
Subscribe to receive smartsockets messages.
|
void |
handleUnsubscribeRequest(java.lang.String subject,
java.lang.String type,
int id)
Unsubscribe smartsockets subscription.
|
boolean |
hasSend()
Method to tell if the "send" cMsg API function is implemented
by this interface implementation in the "handleSendRequest"
method.
|
boolean |
hasSubscribe()
Method to tell if the "subscribe" cMsg API function is implemented
by this interface implementation in the "handleSubscribeRequest"
method.
|
boolean |
hasUnsubscribe()
Method to tell if the "unsubscribe" cMsg API function is implemented
by this interface implementation in the "handleUnsubscribeRequest"
method.
|
void |
registerClient(cMsgClientInfo info)
Connect to smartsockets server.
|
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.
|
handleSendAndGetRequest, handleShutdownClientsRequest, handleSubscribeAndGetRequest, handleSyncSendRequest, handleUnSendAndGetRequest, handleUnsubscribeAndGetRequest, hasSendAndGet, hasShutdown, hasSubscribeAndGet, hasSyncSend
public boolean hasSend()
hasSend
in interface cMsgSubdomainInterface
hasSend
in class cMsgSubdomainAdapter
public boolean hasSubscribe()
hasSubscribe
in interface cMsgSubdomainInterface
hasSubscribe
in class cMsgSubdomainAdapter
public boolean hasUnsubscribe()
hasUnsubscribe
in interface cMsgSubdomainInterface
hasUnsubscribe
in class cMsgSubdomainAdapter
public void setUDLRemainder(java.lang.String UDLRemainder) throws cMsgException
setUDLRemainder
in interface cMsgSubdomainInterface
setUDLRemainder
in class cMsgSubdomainAdapter
UDLRemainder
- last part of the UDL appropriate to the subdomain handlercMsgException
- neverpublic void registerClient(cMsgClientInfo info) throws cMsgException
registerClient
in interface cMsgSubdomainInterface
registerClient
in class cMsgSubdomainAdapter
info
- contains all client infocMsgException
- if cannot connect to smartsockets serverpublic void handleSendRequest(cMsgMessageFull msg) throws cMsgException
handleSendRequest
in interface cMsgSubdomainInterface
handleSendRequest
in class cMsgSubdomainAdapter
msg
- message from sendercMsgException
- if cannot forward messagepublic void handleSubscribeRequest(java.lang.String subject, java.lang.String type, int id) throws cMsgException
handleSubscribeRequest
in interface cMsgSubdomainInterface
handleSubscribeRequest
in class cMsgSubdomainAdapter
subject
- subject subscribed totype
- type subscribed toid
- unique idcMsgException
- if cannot subscribepublic void handleUnsubscribeRequest(java.lang.String subject, java.lang.String type, int id)
handleUnsubscribeRequest
in interface cMsgSubdomainInterface
handleUnsubscribeRequest
in class cMsgSubdomainAdapter
subject
- subject of subscriptiontype
- type of subscriptionid
- unique idpublic void handleClientShutdown() throws cMsgException
handleClientShutdown
in interface cMsgSubdomainInterface
handleClientShutdown
in class cMsgSubdomainAdapter
cMsgException
- never