ucr.core
Class NodeConnection

java.lang.Object
  extended byucr.core.Connection
      extended byucr.core.NodeConnection
All Implemented Interfaces:
java.lang.Runnable

public class NodeConnection
extends Connection

Connection to a servant on the network


Field Summary
 
Fields inherited from class ucr.core.Connection
CONNECTION_INCOMING, CONNECTION_OUTGOING, connectionData, DROP_RATE, host, idx, inputCount, inputStream, inputStreamBuffer, outputStream, port, router, shutdownFlag, SIZE, socket, status, STATUS_CONNECTING, STATUS_FAILED, STATUS_OK, STATUS_STOPPED, type
 
Constructor Summary
(package private) NodeConnection(Router router, java.net.Socket socket, ConnectionData connectionData)
          Construct the connection with an existing socket
(package private) NodeConnection(Router router, java.lang.String host, int port, ConnectionData connectionData)
          Construct the Connection using host/port information
 
Method Summary
private  short[] getMessage()
           
 void run()
          Connection operation
 
Methods inherited from class ucr.core.Connection
add_query, dumpTable, getConnectedServant, getHost, getHostConnectedServant, getStatus, getType, incr_arrive, queryhits_arrived, send, sendAndReceive, shutdown, startIncomingConnection, startOutgoingConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeConnection

NodeConnection(Router router,
               java.lang.String host,
               int port,
               ConnectionData connectionData)
         throws java.net.UnknownHostException,
                java.io.IOException
Construct the Connection using host/port information

Parameters:
router - message router
host - can be a machine name or IP address
port - port to use

NodeConnection

NodeConnection(Router router,
               java.net.Socket socket,
               ConnectionData connectionData)
         throws java.io.IOException
Construct the connection with an existing socket

Parameters:
router - message router
socket - socket connection to another servant
Method Detail

getMessage

private short[] getMessage()

run

public void run()
Connection operation