cgl.narada.service.qos.impl
Class CommunicationsService
java.lang.Object
java.lang.Thread
cgl.narada.service.qos.impl.CommunicationsService
- All Implemented Interfaces:
- Handler, Runnable
public class CommunicationsService
- extends Thread
- implements Handler
This class is responsible for managing communications between the broker and
entities
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
CommunicationsService
public CommunicationsService(QosServiceImpl qosServiceImpl)
isClient
public boolean isClient()
- This method indicates that the node in question is a client
- Specified by:
isClient in interface Handler
handleData
public void handleData(byte[] data,
String sender)
- Specified by:
handleData in interface Handler
terminateService
public void terminateService()
throws ServiceException
- Terminating the service
- Throws:
ServiceException
run
public void run()
- Specified by:
run in interface Runnable- Overrides:
run in class Thread
processData
public void processData(byte[] data,
String sender)
- This method is responsible for dealing with packets of messages that are
received over a link, based on the protocol headers that are contained
within the packets. The DataReceived object is the encapsulation of the
data that is received by one of the ReceiverThreads within the transport
layer.
- Parameters:
_dataReceived - The data that is received by one of the ReceiverThreads
processConnectionLost
public void processConnectionLost()
loadCommunicationsOfType
public void loadCommunicationsOfType(Properties props,
String commType)
throws ServiceException
- Throws:
ServiceException
registerEntity
public void registerEntity(int entityId)
throws ServiceException
- This method is responsible for registering an entity with a specified
broker
- Throws:
ServiceException
setupLink
public String setupLink(Properties props,
String linkType)
throws ServiceException
- Throws:
ServiceException
closeConnection
public void closeConnection()
throws ServiceException
- Throws:
ServiceException
hasPendingTransfers
public boolean hasPendingTransfers()
- Checks to see if there are pending transfers.
sendData
public void sendData(byte[] dataToBeSent)
throws ServiceException
- Throws:
ServiceException
main
public static void main(String[] args)
For comments and suggestions please send
e-mail to
The NaradaBrokering Project