|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
cgl.narada.protocol.ClientProtocolHandler
public class ClientProtocolHandler
This class serves to provide the client with an intermediary between the application layers and the transport layers. The purpose of this class is also to provide for
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
ClientProtocolHandler()
Constructor for the Client Protocol Handler. |
|
| Method Summary | |
|---|---|
void |
eventPropagationRequest(String server,
String event,
int minSize)
This method is responsible for publishing an event to the system. |
short[] |
getLatencyArray()
|
void |
handleData(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. |
void |
initializeLatencyArray(int size)
|
boolean |
isClient()
This method indicates that the node in question is a client |
void |
loadCommunicationsOfType(Properties props,
String commType)
|
static void |
main(String[] args)
|
void |
nodeAddressRequest(String server)
This method is reponsible for issuing a node address request to the server in question. |
void |
persistentEventPropagationRequest(String server,
String event,
int minSize)
This method is responsible for publishing a persistent event to the system. |
void |
printTestCaseDetails()
|
void |
processEventReceived(String sender,
byte[] receivedEventBytes)
This method processes the packet that is received with the Protocol.EVENT header. |
void |
processNodeAddressResponse(String sender,
byte[] addressResponse)
Process the response that you have received from the server pertaining to the address request that was issued. |
void |
processPersistentEventReceived(String sender,
byte[] receivedEventBytes)
This method processes the packet that is received with the Protocol.EVENT header. |
void |
profilePropagationRequest(String server,
String subscription)
Propagates the interest in a subscription to the server in question. |
void |
run()
|
void |
sendTo(String node,
byte[] data)
For communicating with a server node which hasn't been assigned a logical address so far |
void |
sendToNode(Gateway nodeAddress,
byte[] data)
This method send information over a specified hop. |
void |
setClientNode(ClientNode clientNode)
|
void |
setLoopThroughMessageSizes(String reportFileName)
|
void |
setPublishRate(int _pubRate)
|
String |
setupLink(Properties props,
String linkType)
|
| 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ClientProtocolHandler()
| Method Detail |
|---|
public void setClientNode(ClientNode clientNode)
public boolean isClient()
isClient in interface Handler
public void handleData(byte[] data,
String sender)
handleData in interface Handler_dataReceived - The data that is received by one of the ReceiverThreadspublic void initializeLatencyArray(int size)
public void setLoopThroughMessageSizes(String reportFileName)
public short[] getLatencyArray()
public void setPublishRate(int _pubRate)
public void printTestCaseDetails()
public void processEventReceived(String sender,
byte[] receivedEventBytes)
sender - The server from which we received this event.receivedEventBytes - The byte stream representation of the event, including the
protocol headers and other information
public void processPersistentEventReceived(String sender,
byte[] receivedEventBytes)
sender - The server from which we received this event.receivedEventBytes - The byte stream representation of the event, including the
protocol headers and other information
public void processNodeAddressResponse(String sender,
byte[] addressResponse)
sender - -
The server from which this response was received.addressResponse - -
The byte stream representation of the address responsepublic void nodeAddressRequest(String server)
server - The server to which this request is being issued.
public void profilePropagationRequest(String server,
String subscription)
server - The server to which this client is attached.subscription - The subscription predicate for the client
public void eventPropagationRequest(String server,
String event,
int minSize)
server - The server to which this request is being issued.event - The event that is being publishedminSize - Minimum Size of the event being published.
public void persistentEventPropagationRequest(String server,
String event,
int minSize)
server - The server to which this request is being issued.event - The event that is being publishedminSize - Minimum Size of the event being published.
public void loadCommunicationsOfType(Properties props,
String commType)
throws TransportException
TransportException
public String setupLink(Properties props,
String linkType)
throws TransportException
TransportException
public void sendTo(String node,
byte[] data)
node - The string identifier for the server node.data - The byte stream containing the information.
public void sendToNode(Gateway nodeAddress,
byte[] data)
public void run()
run in interface Runnablerun in class Threadpublic static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||