|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--disciple.core.Connection
|
+--disciple.connections.TcpConnection
Implements a tcp based connection.
Needs more work on reestablishing the socket connection if broken.
Copyright (c) 2002 Rutgers, The State University of New Jersey
| Field Summary | |
protected java.io.ObjectInputStream |
in_
|
protected java.io.ObjectOutputStream |
out_
|
protected java.lang.Thread |
readThread_
|
protected disciple.connections.TcpConnection.WriteThread |
writeThread_
|
| Fields inherited from class disciple.core.Connection |
CONNECTED, CONNECTING, destination_, localId_, NOT_CONNECTED, state_ |
| Constructor Summary | |
TcpConnection(int priorityLevels,
java.net.Socket socket)
Constructor creating a TcpConnection. |
|
| Method Summary | |
protected void |
panic()
|
void |
run()
Receive loop for the connection. |
void |
send(Command cmd,
int priority)
Sends a command to the connections peer. |
protected void |
send(ControlMessage msg)
|
void |
setLocalId(java.lang.Object localId)
|
void |
setQoSParameters(org.w3c.dom.Node parameters)
Sets the QoS parameters for this connection. |
| Methods inherited from class disciple.core.Connection |
addCommandListener, addConnectionListener, fireCommand, fireConnectionChanged, getDestination, getLocalId, getPriorityLevels, getState, removeCommandListener, removeConnectionListener, setDestination, setState |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.Thread readThread_
protected disciple.connections.TcpConnection.WriteThread writeThread_
protected java.io.ObjectInputStream in_
protected java.io.ObjectOutputStream out_
| Constructor Detail |
public TcpConnection(int priorityLevels,
java.net.Socket socket)
priorityLevels - the number of priority levels for the commandssocket - the communication socket to be used| Method Detail |
public void setLocalId(java.lang.Object localId)
setLocalId in class Connection
public void send(Command cmd,
int priority)
send in class Connectioncmd - - The command to be sent.priority - - The priority of the command.protected void send(ControlMessage msg)
send in class Connectionpublic void setQoSParameters(org.w3c.dom.Node parameters)
setQoSParameters in class Connectionparameters - public void run()
run in interface java.lang.Runnableprotected void panic()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||