org.jppf.comm.socket
Class AbstractSocketInitializer

java.lang.Object
  extended by org.jppf.comm.socket.AbstractSocketInitializer
All Implemented Interfaces:
SocketInitializer
Direct Known Subclasses:
JcaSocketInitializer, SocketInitializerImpl

public abstract class AbstractSocketInitializer
extends Object
implements SocketInitializer

Common abstract superclass for objects that establish a connection with a remote socket.

Author:
Laurent Cohen

Field Summary
protected  int attemptCount
          Current number of connection attempts.
protected  boolean closed
          Determine whether this socket initializer has been intentionally closed.
protected  String name
          Name given to this initializer.
protected  Random rand
          Used to compute a random start delay for this node.
protected  SocketWrapper socketWrapper
          The socket wrapper to initialize.
protected  boolean successfull
          Determines whether any connection attempt succeeded.
 
Constructor Summary
AbstractSocketInitializer()
           
 
Method Summary
 String getName()
          Get the name given to this initializer.
 boolean isClosed()
          Determine whether this socket initializer has been intentionally closed.
 boolean isSuccessfull()
          Determine whether any connection attempt succeeded.
 void setName(String name)
          Set the name given to this initializer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jppf.comm.socket.SocketInitializer
close, initializeSocket
 

Field Detail

successfull

protected boolean successfull
Determines whether any connection attempt succeeded.


attemptCount

protected int attemptCount
Current number of connection attempts.


socketWrapper

protected SocketWrapper socketWrapper
The socket wrapper to initialize.


rand

protected Random rand
Used to compute a random start delay for this node.


closed

protected boolean closed
Determine whether this socket initializer has been intentionally closed.


name

protected String name
Name given to this initializer.

Constructor Detail

AbstractSocketInitializer

public AbstractSocketInitializer()
Method Detail

isClosed

public boolean isClosed()
Determine whether this socket initializer has been intentionally closed.

Specified by:
isClosed in interface SocketInitializer
Returns:
true if this socket initializer has been intentionally closed, false otherwise.
See Also:
SocketInitializer.isClosed()

isSuccessfull

public boolean isSuccessfull()
Determine whether any connection attempt succeeded.

Specified by:
isSuccessfull in interface SocketInitializer
Returns:
true if any attempt was successfull, false otherwise.
See Also:
SocketInitializer.isSuccessfull()

getName

public String getName()
Get the name given to this initializer.

Specified by:
getName in interface SocketInitializer
Returns:
the name as a string.
See Also:
SocketInitializer.getName()

setName

public void setName(String name)
Set the name given to this initializer.

Specified by:
setName in interface SocketInitializer
Parameters:
name - the name as a string.
See Also:
SocketInitializer.setName(java.lang.String)


Copyright © 2005-2010 JPPF Team.