org.jppf.comm.socket
Class SocketInitializerImpl

java.lang.Object
  extended by org.jppf.comm.socket.AbstractSocketInitializer
      extended by org.jppf.comm.socket.SocketInitializerImpl
All Implemented Interfaces:
SocketInitializer

public class SocketInitializerImpl
extends AbstractSocketInitializer

Instances of this class attempt to connect a SocketWrapper to a remote server. The connection attempts are performed until a configurable amount of time has passed, and at a configurable time interval. When no attempt succeeded, a JPPFError is thrown, and the application should normally exit.

Author:
Laurent Cohen

Field Summary
 
Fields inherited from class org.jppf.comm.socket.AbstractSocketInitializer
attemptCount, closed, name, rand, socketWrapper, successfull
 
Constructor Summary
SocketInitializerImpl()
          Instantiate this SocketInitializer with a specified socket wrapper.
 
Method Summary
 void close()
          Close this initializer.
 void initializeSocket(SocketWrapper socketWrapper)
          Initialize the underlying socket client, by starting a Timer and a corresponding TimerTask until a specified amount of time has passed.
 
Methods inherited from class org.jppf.comm.socket.AbstractSocketInitializer
getName, isClosed, isSuccessfull, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SocketInitializerImpl

public SocketInitializerImpl()
Instantiate this SocketInitializer with a specified socket wrapper.

Method Detail

initializeSocket

public void initializeSocket(SocketWrapper socketWrapper)
Initialize the underlying socket client, by starting a Timer and a corresponding TimerTask until a specified amount of time has passed.

Parameters:
socketWrapper - the socket wrapper to initialize.
See Also:
SocketInitializer.initializeSocket(org.jppf.comm.socket.SocketWrapper)

close

public void close()
Close this initializer.

See Also:
SocketInitializer.close()


Copyright © 2005-2010 JPPF Team.