com.cafesoft.core.message
Interface Connector

All Known Implementing Classes:
DefaultConnector

public interface Connector

Listens to a ServerSocket and creates Connection objects to handle incoming Socket connections.

Since:
1/31/02

Method Summary
 int getAcceptCount()
          Returns the accept count for connections to this connector.
 String getAddress()
          Returns the IP address to which this connector binds.
 ServerSocketFactory getFactory()
          Returns the server socket factory used by this connector.
 String getInfo()
          Returns descriptive information about this connector implementation.
 int getPort()
          Returns the port to which this connector binds.
 void initialize()
          Invokes pre-startup initialization.
 boolean isStarted()
          Determine if the implementing Lifecycle object has been started.
 void setAcceptCount(int count)
          Sets the accept count for connections to this connector.
 void setAddress(String address)
          Sets the IP address to which this connector binds.
 void setFactory(ServerSocketFactory factory)
          Sets the server socket factory used by this connector.
 void setMessageServiceProvider(MessageServiceProvider msp)
          Set the MessageServiceProvider.
 void setPort(int port)
          Sets the port to which this connector binds.
 void start()
          Starts the connector listening for incoming connections.
 void stop()
          Stops the connector listening for incoming connections.
 

Method Detail

setMessageServiceProvider

public void setMessageServiceProvider(MessageServiceProvider msp)
Set the MessageServiceProvider.

Parameters:
msp - the MessageServiceProvider

setFactory

public void setFactory(ServerSocketFactory factory)
Sets the server socket factory used by this connector.

Parameters:
factory - the new ServerSocketFactory for this connector

getFactory

public ServerSocketFactory getFactory()
Returns the server socket factory used by this connector.

Returns:
the ServerSocketFactory for this connector

getInfo

public String getInfo()
Returns descriptive information about this connector implementation.

Returns:
information about this Connector

setAddress

public void setAddress(String address)
Sets the IP address to which this connector binds.

Parameters:
address - the new IP address for this Connector

getAddress

public String getAddress()
Returns the IP address to which this connector binds.

Returns:
the IP address for this Connector

setPort

public void setPort(int port)
Sets the port to which this connector binds.

Parameters:
port - the port to which this connector binds

getPort

public int getPort()
Returns the port to which this connector binds.

Returns:
the port for this Connector

setAcceptCount

public void setAcceptCount(int count)
Sets the accept count for connections to this connector.

Parameters:
count - the new accept count for this Connector

getAcceptCount

public int getAcceptCount()
Returns the accept count for connections to this connector.

Returns:
the accept count for this Connector

initialize

public void initialize()
                throws LifecycleException
Invokes pre-startup initialization. This is used to allow connectors to bind to restricted ports under Unix operating environments.

Throws:
LifecycleException - if this Connector was already initialized

isStarted

public boolean isStarted()
Determine if the implementing Lifecycle object has been started.

Returns:
true if the Lifecycle object has been started, false otherwise

start

public void start()
           throws LifecycleException
Starts the connector listening for incoming connections.

Throws:
LifecycleException - ff this Connector was already started

stop

public void stop()
          throws LifecycleException
Stops the connector listening for incoming connections.

Throws:
LifecycleException - if this Connector was already stopped


Generated on 10:40:31 AM September 10, 2003, © 1996-2003 Cafésoft LLC. All rights reserved.