1.0.0

org.eclipse.soda.dk.tcpip.server.connection
Class TcpipServerConnection

java.lang.Object
  extended by org.eclipse.soda.dk.core.EscObject
      extended by org.eclipse.soda.dk.connection.Connection
          extended by org.eclipse.soda.dk.connection.StreamConnection
              extended by org.eclipse.soda.dk.tcpip.server.connection.TcpipServerConnection
All Implemented Interfaces:
ConnectionService, TcpipServerConnectionService

public class TcpipServerConnection
extends StreamConnection
implements TcpipServerConnectionService, ConnectionService

The TcpipServerConnection class implements the ConnectionService interface. This class provides for a server connection to a single client.

Version:
1.0.0
See Also:
TcpipConnection, ConnectionService, ServerSocket, Socket

Field Summary
protected static char[] TOSTRING_NAME
          Define the tostring name (char[]) constant.
 
Fields inherited from class org.eclipse.soda.dk.connection.Connection
CLIENT_WAIT_RESOURCE, CLOSE_RESOURCE, CLOSED_RESOURCE, configurationService, OPEN_RESOURCE, OPENFAILED_RESOURCE, READ_BYTES_RESOURCE, WRITE_BYTES_RESOURCE
 
Fields inherited from class org.eclipse.soda.dk.core.EscObject
CLONE_EXCEPTION_RESOURCE, EMPTY_BYTES, EMPTY_STRING, ERROR_OCCURRED_EXCEPTION_RESOURCE, ID_FILTER_KEY, ID_KEY, ID_KEY_ANY, INTEGER_TABLE, KEY_KEY, LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_TRACE, LOG_WARNING, PREFIX_KEY, RESOURCE_BUNDLE, SLEEP_EXCEPTION_RESOURCE, SYSTEM_INFO_RESOURCE, TO_STRING_CONFIGURATION_KEYS, TRACE_LEVEL_HIGH, TRACE_LEVEL_LOW, TRACE_LEVEL_MAX, TRACE_LEVEL_MIN, TRACE_LEVEL_NONE, TRACE_LEVEL_NORMAL, TRACELEVEL_KEY, UNKNOWN_ERROR_RESOURCE
 
Fields inherited from interface org.eclipse.soda.dk.tcpip.server.connection.service.TcpipServerConnectionService
CONNECTION_TYPE, DEFAULT_LINGER, DEFAULT_PORT, DEFAULT_QUEUELENGTH, DEFAULT_TIMEOUT, FACTORY_SERVICE_NAME, LINGER_KEY, PORT_KEY, QUEUELENGTH_KEY, SERVICE_NAME, TIMEOUT_KEY
 
Fields inherited from interface org.eclipse.soda.dk.connection.service.ConnectionService
CONNECTION_KEY, DEFAULT_CONNECTION
 
Constructor Summary
TcpipServerConnection(ConfigurationService configuration)
          Constructs an instance of this class from the specified configuration parameter.
TcpipServerConnection(java.util.Dictionary properties)
          Constructs an instance of this class from the specified properties parameter.
TcpipServerConnection(int port)
          Constructs an TcpipServerConnection object using the input parameter(s).
TcpipServerConnection(int port, int queueLength)
          Constructs an TcpipServerConnection object using the input parameter(s).
TcpipServerConnection(int port, int queueLength, int timeout)
          Constructs an TcpipServerConnection object using the input parameter(s).
TcpipServerConnection(int port, int queueLength, int timeout, int linger)
          Constructs an TcpipServerConnection object using the input parameter(s).
 
Method Summary
 void close()
          Perform the close action method.
 TcpipConnection getClient()
          Gets the TcpipConnection client property value.
 boolean isOpen()
          Gets the boolean open property value.
 void open()
          Open the server connection.
 void toStringInfo(java.lang.StringBuffer buffer)
          To string info with the specified buffer parameter.
 
Methods inherited from class org.eclipse.soda.dk.connection.StreamConnection
flush, getInputStream, getOutputStream, read, read, setInputStream, setOutputStream, write, write
 
Methods inherited from class org.eclipse.soda.dk.connection.Connection
attemptRecoveryFromError, exit, finalize, getConfigurationService, getDefaultResource, getErrorSeverity, getResource, setConfigurationService, setOpen
 
Methods inherited from class org.eclipse.soda.dk.core.EscObject
createDefaultLogService, createException, createException, createInteger, createIntegerTable, createNumber, format, getBoolean, getCurrentTimestamp, getDefaultLogService, getFloat, getInt, getLoadLibraryName, getLogDetails, getLogDetails0, getLogDetails1, getLogDetails2, getLogDetails3, getLogDetails4, getLogDetails5, getLogDetails6, getLogDetails7, getLogService, getLong, getObject, getOutputName, getSimpleClassName, getStaticBoolean, getStaticFloat, getStaticInt, getStaticLong, getStaticObject, getStaticString, getString, getTraceLevel, getVmLibraryVersion, handleError, handleError, handleError, handleStaticError, handleStaticException, isDebug, isTrace, loadService, log, log, report, report, report, report, report, report, reportError, reportSystemInfo, setDebug, setDefaultLogService, setLogService, setTraceLevel, shouldLog, sleep, startupEscStatic, toString, toStringConfigurationKeys
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.soda.dk.connection.service.ConnectionService
exit, flush, read, read, write, write
 

Field Detail

TOSTRING_NAME

protected static final char[] TOSTRING_NAME
Define the tostring name (char[]) constant.

Constructor Detail

TcpipServerConnection

public TcpipServerConnection(int port)
Constructs an TcpipServerConnection object using the input parameter(s). int

Parameters:
port - The port (int) parameter.
See Also:
TcpipServerConnection(int,int), TcpipServerConnection(int,int,int), TcpipServerConnection(int,int,int,int), TcpipServerConnection(Dictionary), TcpipServerConnection(ConfigurationService)

TcpipServerConnection

public TcpipServerConnection(int port,
                             int queueLength)
Constructs an TcpipServerConnection object using the input parameter(s). int int

Parameters:
port - The port (int) parameter.
queueLength - The queue length (int) parameter.
See Also:
TcpipServerConnection(int), TcpipServerConnection(int,int,int), TcpipServerConnection(int,int,int,int), TcpipServerConnection(Dictionary), TcpipServerConnection(ConfigurationService)

TcpipServerConnection

public TcpipServerConnection(int port,
                             int queueLength,
                             int timeout)
Constructs an TcpipServerConnection object using the input parameter(s). int int int

Parameters:
port - The port (int) parameter.
queueLength - The queue length (int) parameter.
timeout - The timeout (int) parameter.
See Also:
TcpipServerConnection(int), TcpipServerConnection(int,int), TcpipServerConnection(int,int,int,int), TcpipServerConnection(Dictionary), TcpipServerConnection(ConfigurationService)

TcpipServerConnection

public TcpipServerConnection(int port,
                             int queueLength,
                             int timeout,
                             int linger)
Constructs an TcpipServerConnection object using the input parameter(s). value in milliseconds linger value (value of zero means no linger). The port (int) parameter. The queue length (int) parameter.

Parameters:
port - The port (int) parameter.
queueLength - The queue length (int) parameter.
timeout - The timeout (int) parameter.
linger - The linger (int) parameter.
See Also:
TcpipServerConnection(int), TcpipServerConnection(int,int), TcpipServerConnection(int,int,int), TcpipServerConnection(Dictionary), TcpipServerConnection(ConfigurationService)

TcpipServerConnection

public TcpipServerConnection(java.util.Dictionary properties)
Constructs an instance of this class from the specified properties parameter.

Parameters:
properties - The properties (Dictionary) parameter.
See Also:
TcpipServerConnection(int), TcpipServerConnection(int,int), TcpipServerConnection(int,int,int), TcpipServerConnection(int,int,int,int), TcpipServerConnection(ConfigurationService)

TcpipServerConnection

public TcpipServerConnection(ConfigurationService configuration)
Constructs an instance of this class from the specified configuration parameter.

Parameters:
configuration - The configuration (ConfigurationService) parameter.
See Also:
TcpipServerConnection(int), TcpipServerConnection(int,int), TcpipServerConnection(int,int,int), TcpipServerConnection(int,int,int,int), TcpipServerConnection(Dictionary)
Method Detail

close

public void close()
           throws java.io.IOException
Perform the close action method. href="java.io.IOException.html">IOException Thrown if the IOException exception condition occurs.

Specified by:
close in interface ConnectionService
Overrides:
close in class StreamConnection
Throws:
java.io.IOException
See Also:
ConnectionService.close()

getClient

public TcpipConnection getClient()
Gets the TcpipConnection client property value.

Returns:
Results of the get client (TcpipConnection) value.

isOpen

public boolean isOpen()
Gets the boolean open property value.

Specified by:
isOpen in interface ConnectionService
Overrides:
isOpen in class Connection
Returns:
Results of the is open (boolean) value.
See Also:
ConnectionService.isOpen()

open

public void open()
          throws java.io.IOException
Open the server connection. After receiving the accept, then set the input and output streams to the client. href="java.io.IOException.html">IOException Thrown if the IOException exception condition occurs.

Specified by:
open in interface ConnectionService
Overrides:
open in class Connection
Throws:
java.io.IOException
See Also:
ConnectionService.open()

toStringInfo

public void toStringInfo(java.lang.StringBuffer buffer)
To string info with the specified buffer parameter.

Overrides:
toStringInfo in class EscObject
Parameters:
buffer - The buffer (StringBuffer) parameter.

1.0.0

Copyright (c) 1999, 2007 IBM