de.uniba.wiai.lspi.chord.com.socket
Class SocketEndpoint
java.lang.Object
de.uniba.wiai.lspi.chord.com.Endpoint
de.uniba.wiai.lspi.chord.com.socket.SocketEndpoint
- All Implemented Interfaces:
- java.lang.Runnable
public final class SocketEndpoint
- extends Endpoint
- implements java.lang.Runnable
This class represents an Endpoint
for communication over socket
protocol. It provides a ServerSocket
to that clients can
connect and starts for each incoming connection a
RequestHandler
that handles
Request
s for method invocations
from remote nodes. These Request
s
are sent by one SocketProxy
representing the node, that this is the
endpoint for, at another node.
- Version:
- 1.0.5
modified, 0.99b
- Author:
- sven, bojanm
Method Summary |
void |
run()
Run method from Runnable to accept connections from clients. |
Methods inherited from class de.uniba.wiai.lspi.chord.com.Endpoint |
acceptEntries, createEndpoint, deregister, disconnect, getEndpoint, getNode, getState, getURL, listen, register, toString |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SocketEndpoint
public SocketEndpoint(Node node1,
URL url1)
- Creates a new
SocketEndpoint
for the given Node
with url
. url
must have the protocol indexed
by URL.SOCKET_PROTOCOL
in the
URL.KNOWN_PROTOCOLS
array.
- Parameters:
node1
- The Node
node this endpoint provides connections to.url1
- The URL
of this endpoint.
run
public void run()
- Run method from
Runnable
to accept connections from clients. This
method runs until closeConnections()
is called. It creates
threads responsible for the handling of requests from other nodes.
- Specified by:
run
in interface java.lang.Runnable