quickfix
Interface Connector

All Known Subinterfaces:
Acceptor, Initiator
All Known Implementing Classes:
AbstractSocketAcceptor, AbstractSocketInitiator, SocketAcceptor, SocketInitiator, ThreadedSocketAcceptor, ThreadedSocketInitiator

public interface Connector

Common base interface for acceptors and initiators.


Method Summary
 void block()
          Start accepting connections.
 java.util.ArrayList<SessionID> getSessions()
          Returns the sessions managed by this acceptor.
 boolean isLoggedOn()
          Checks the logged on status of the session.
 void start()
          Start accepting connections.
 void stop()
          Logout existing sessions, close their connections, and stop accepting new connections.
 void stop(boolean force)
          Stops all sessions, optionally waiting for logout completion.
 

Method Detail

start

void start()
           throws ConfigError,
                  RuntimeError
Start accepting connections. Returns immediately. See implementations of this interface potential threading issues.

Throws:
ConfigError - Problem with acceptor configuration.
RuntimeError - Other unspecified error

stop

void stop()
Logout existing sessions, close their connections, and stop accepting new connections.


stop

void stop(boolean force)
Stops all sessions, optionally waiting for logout completion.

Parameters:
force - don't wait for logout before disconnect.

block

void block()
           throws ConfigError,
                  RuntimeError
Start accepting connections. This method blocks until stop is called from another thread.

Throws:
ConfigError - Problem with acceptor configuration.
RuntimeError - Other unspecified error

isLoggedOn

boolean isLoggedOn()
Checks the logged on status of the session.

Returns:
true is any session is logged on, false otherwise.

getSessions

java.util.ArrayList<SessionID> getSessions()
Returns the sessions managed by this acceptor.

Returns:
the sessions associated with this acceptor