fabric.net
Class RemoteNode

java.lang.Object
  extended by fabric.net.RemoteNode
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RemoteStore, RemoteWorker

public abstract class RemoteNode
extends java.lang.Object
implements java.io.Serializable

Abstracts remote stores and remote workers.

See Also:
Serialized Form

Field Summary
 java.lang.String name
          The DNS hostname of the node.
 
Constructor Summary
protected RemoteNode(java.lang.String name, boolean supportsUnencrypted)
           
 
Method Summary
 void cleanup()
           
protected abstract  SocketAddress lookup()
           
 java.lang.String name()
           
 Stream openStream(boolean useSSL)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public final java.lang.String name
The DNS hostname of the node.

Constructor Detail

RemoteNode

protected RemoteNode(java.lang.String name,
                     boolean supportsUnencrypted)
Method Detail

lookup

protected abstract SocketAddress lookup()
                                 throws java.io.IOException
Returns:
Throws:
java.io.IOException

name

public final java.lang.String name()
Returns:
the node's hostname.

openStream

public final Stream openStream(boolean useSSL)
Parameters:
useSSL - Whether SSL is being used. This is ignored if the node type doesn't support non-SSL connections.
Returns:
the data I/O stream pair to use for communicating with the node.

cleanup

public void cleanup()