2008-09-10 1.1.0

org.eclipse.soda.dk.tcpip.connection
Class TcpipConnection

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.connection.TcpipConnection
All Implemented Interfaces:
ConnectionService, TcpipConnectionService

public class TcpipConnection
extends StreamConnection
implements ConnectionService, TcpipConnectionService

Transmission Control Protocol/Internet Protocol (TCP/IP) Connection. The TcpipConnection class implements the TcpipConnectionService and provides the controls for the connection.

The list of exported services:

Version:
1.1.0
See Also:
TcpipConnectionService, ConnectionService

Field Summary
static java.lang.String CLASS_NAME
          Defines the full class name.
static java.lang.String[] TO_STRING_CONFIGURATION_KEYS
          Define the to string configuration keys (String[]) constant.
 
Fields inherited from class org.eclipse.soda.dk.connection.Connection
CHANNEL_ACTIVE_STATE_RESOURCE, CHANNEL_ALIVE_STATE_RESOURCE, CHANNEL_CLOSED_RESOURCE, CHANNEL_CONNECTED_STATE_RESOURCE, CHANNEL_CREATED_STATE_RESOURCE, CHANNEL_DEAD_STATE_RESOURCE, CHANNEL_OPEN, CHANNEL_OPENFAILED_RESOURCE, CHANNEL_READ_BYTES_RESOURCE, CHANNEL_STARTED_STATE_RESOURCE, CHANNEL_WRITE_BYTES_RESOURCE, CLIENT_WAIT_RESOURCE, CLOSE_RESOURCE, CLOSED_RESOURCE, configurationService, logLevel, OPEN_RESOURCE, OPENFAILED_RESOURCE, READ_BYTES_RESOURCE, readByteCount, WRITE_BYTES_RESOURCE, writeByteCount
 
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, ID_NAME_KEY, INTEGER_TABLE, INTEGER_TABLE_SIZE, KEY_KEY, LOG_DEBUG, LOG_DEFAULT, LOG_ERROR, LOG_INFO, LOG_LEVEL_KEY, LOG_TRACE, LOG_WARNING, LONG_TABLE, LONG_TABLE_SIZE, PREFIX_KEY, READONLY_EMPTY_COLLECTION, READONLY_EMPTY_LIST, READONLY_EMPTY_MAP, RESOURCE_BUNDLE, SLEEP_EXCEPTION_RESOURCE, SYSTEM_INFO_RESOURCE, TRACE_LEVEL_HIGH, TRACE_LEVEL_LOW, TRACE_LEVEL_MAX, TRACE_LEVEL_MIN, TRACE_LEVEL_NONE, TRACE_LEVEL_NORMAL, TRACELEVEL_KEY, UNKNOWN_ERROR_RESOURCE, Unmodifiable
 
Fields inherited from interface org.eclipse.soda.dk.tcpip.connection.service.TcpipConnectionService
CONNECTION_TYPE, DEFAULT_HOST, DEFAULT_LINGER, DEFAULT_LOCALHOST, DEFAULT_LOCALPORT, DEFAULT_READSIZE, DEFAULT_READTIMEOUT, DEFAULT_REMOTEHOST, DEFAULT_REMOTEPORT, DEFAULT_WRITESIZE, FACTORY_SERVICE_NAME, HOST, HOST_DEFAULT, HOST_KEY, LINGER, LINGER_DEFAULT, LINGER_KEY, LOCALHOST, LOCALHOST_DEFAULT, LOCALHOST_KEY, LOCALPORT, LOCALPORT_DEFAULT, LOCALPORT_KEY, MANAGED_SERVICE_NAME, READSIZE, READSIZE_DEFAULT, READSIZE_KEY, READTIMEOUT, READTIMEOUT_DEFAULT, READTIMEOUT_KEY, REMOTEHOST, REMOTEHOST_DEFAULT, REMOTEHOST_KEY, REMOTEPORT, REMOTEPORT_DEFAULT, REMOTEPORT_KEY, SERVICE_DESCRIPTION, SERVICE_NAME, TcpipConnection, WRITESIZE, WRITESIZE_DEFAULT, WRITESIZE_KEY
 
Constructor Summary
TcpipConnection(ConfigurationService configuration)
           
TcpipConnection(java.util.Dictionary properties)
           
TcpipConnection(java.net.Socket port)
          Constructs an TcpipConnection object using the input parameter(s).
TcpipConnection(java.lang.String targetHost, int targetPort)
          Constructs an TcpipConnection object using the input parameter(s).
TcpipConnection(java.lang.String targetHost, int targetPort, int localPort)
          Constructs an TcpipConnection object using the input parameter(s).
TcpipConnection(java.lang.String targetHost, int targetPort, int localPort, int timeout)
          Insert the method's description here.
TcpipConnection(java.lang.String targetHost, int targetPort, int localPort, int timeout, int sendBufferSize, int receiveBufferSize)
           
TcpipConnection(java.lang.String targetHost, int targetPort, int localPort, int timeout, int sendBufferSize, int receiveBufferSize, int linger)
           
TcpipConnection(java.lang.String localHost, int localPort, java.lang.String targetHost, int targetPort, int timeout, int sendBufferSize, int receiveBufferSize, int linger)
          Constructs an instance of this class from the specified local host, local port, target host, target port, timeout, send buffer size, receive buffer size and linger parameters.
 
Method Summary
 void close()
          Perform the close action method.
 void exit()
          Exit.
 java.net.Socket getPort()
          Gets the port (Socket) value.
 boolean isOpen()
          Gets the open (boolean) value.
 void open()
          Perform the open action method.
 void setPort(java.net.Socket port)
           
 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, finalize, getConfigurationService, getDefaultResource, getErrorSeverity, getLogDetails4, getLogDetails5, getLogLevel, getReadByteCount, getResource, getWriteByteCount, setConfigurationInformation, setConfigurationService, setLogLevel, setOpen, setReadByteCount, setWriteByteCount, updateReadByteCount, updateWriteByteCount
 
Methods inherited from class org.eclipse.soda.dk.core.EscObject
createDefaultLogService, createException, createException, createInteger, createIntegerTable, createLong, createLongTable, createNumber, format, getBoolean, getCurrentTimestamp, getDefaultLogService, getFloat, getId, getIdName, getInt, getLoadLibraryName, getLogDetails, getLogDetails0, getLogDetails1, getLogDetails2, getLogDetails3, getLogDetails6, getLogDetails7, getLogService, getLong, getObject, getOutputName, getReadOnlyEmptyCollection, getReadOnlyEmptyList, getReadOnlyEmptyMap, getSimpleClassName, getStaticBoolean, getStaticFloat, getStaticInt, getStaticLong, getStaticObject, getStaticString, getString, getTraceLevel, getVmLibraryVersion, handleError, handleError, handleError, handleError, handleErrorInternal, handleStaticError, handleStaticException, isBackward, isDebug, isLogging, isTrace, isUnmodifiable, loadService, log, log, log, report, report, report, report, report, report, reportError, reportSystemInfo, setBackward, setDebug, setDefaultLogService, setLogService, setTraceLevel, setUnmodifiable, shouldLog, sleep, startupEscStatic, toString, toStringConfigurationKeys
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_NAME

public static final java.lang.String CLASS_NAME
Defines the full class name.

See Also:
Constant Field Values

TO_STRING_CONFIGURATION_KEYS

public static final java.lang.String[] TO_STRING_CONFIGURATION_KEYS
Define the to string configuration keys (String[]) constant.

Constructor Detail

TcpipConnection

public TcpipConnection(ConfigurationService configuration)
Parameters:
configuration - The configuration (ConfigurationService) parameter.
See Also:
TcpipConnection(Dictionary), TcpipConnection(Socket), TcpipConnection(String,int), TcpipConnection(String,int,int), TcpipConnection(String,int,int,int), TcpipConnection(String,int,int,int,int,int), TcpipConnection(String,int,int,int,int,int,int), TcpipConnection(String,int,String,int,int,int,int,int)

TcpipConnection

public TcpipConnection(java.util.Dictionary properties)
Parameters:
properties - The properties (Dictionary) parameter.
See Also:
TcpipConnection(ConfigurationService), TcpipConnection(Socket), TcpipConnection(String,int), TcpipConnection(String,int,int), TcpipConnection(String,int,int,int), TcpipConnection(String,int,int,int,int,int), TcpipConnection(String,int,int,int,int,int,int), TcpipConnection(String,int,String,int,int,int,int,int)

TcpipConnection

public TcpipConnection(java.net.Socket port)
Constructs an TcpipConnection object using the input parameter(s). java.net.Socket

Parameters:
port - The port (Socket) parameter.
See Also:
TcpipConnection(ConfigurationService), TcpipConnection(Dictionary), TcpipConnection(String,int), TcpipConnection(String,int,int), TcpipConnection(String,int,int,int), TcpipConnection(String,int,int,int,int,int), TcpipConnection(String,int,int,int,int,int,int), TcpipConnection(String,int,String,int,int,int,int,int)

TcpipConnection

public TcpipConnection(java.lang.String targetHost,
                       int targetPort)
Constructs an TcpipConnection object using the input parameter(s). java.lang.String int

Parameters:
targetHost - The target host (String) parameter.
targetPort - The target port (int) parameter.
See Also:
TcpipConnection(ConfigurationService), TcpipConnection(Dictionary), TcpipConnection(Socket), TcpipConnection(String,int,int), TcpipConnection(String,int,int,int), TcpipConnection(String,int,int,int,int,int), TcpipConnection(String,int,int,int,int,int,int), TcpipConnection(String,int,String,int,int,int,int,int)

TcpipConnection

public TcpipConnection(java.lang.String targetHost,
                       int targetPort,
                       int localPort)
Constructs an TcpipConnection object using the input parameter(s). java.lang.String int int

Parameters:
targetHost - The target host (String) parameter.
targetPort - The target port (int) parameter.
localPort - The local port (int) parameter.
See Also:
TcpipConnection(ConfigurationService), TcpipConnection(Dictionary), TcpipConnection(Socket), TcpipConnection(String,int), TcpipConnection(String,int,int,int), TcpipConnection(String,int,int,int,int,int), TcpipConnection(String,int,int,int,int,int,int), TcpipConnection(String,int,String,int,int,int,int,int)

TcpipConnection

public TcpipConnection(java.lang.String targetHost,
                       int targetPort,
                       int localPort,
                       int timeout)
Insert the method's description here. Creation date: (4/10/00 9:31:45 AM) java.lang.String int int int

Parameters:
targetHost - The target host (String) parameter.
targetPort - The target port (int) parameter.
localPort - The local port (int) parameter.
timeout - The timeout (int) parameter.
See Also:
TcpipConnection(ConfigurationService), TcpipConnection(Dictionary), TcpipConnection(Socket), TcpipConnection(String,int), TcpipConnection(String,int,int), TcpipConnection(String,int,int,int,int,int), TcpipConnection(String,int,int,int,int,int,int), TcpipConnection(String,int,String,int,int,int,int,int)

TcpipConnection

public TcpipConnection(java.lang.String targetHost,
                       int targetPort,
                       int localPort,
                       int timeout,
                       int sendBufferSize,
                       int receiveBufferSize)
Parameters:
targetHost - The target host (String) parameter.
targetPort - The target port (int) parameter.
localPort - The local port (int) parameter.
timeout - The timeout (int) parameter.
sendBufferSize - The send buffer size (int) parameter.
receiveBufferSize - The receive buffer size (int) parameter.
See Also:
TcpipConnection(ConfigurationService), TcpipConnection(Dictionary), TcpipConnection(Socket), TcpipConnection(String,int), TcpipConnection(String,int,int), TcpipConnection(String,int,int,int), TcpipConnection(String,int,int,int,int,int,int), TcpipConnection(String,int,String,int,int,int,int,int)

TcpipConnection

public TcpipConnection(java.lang.String targetHost,
                       int targetPort,
                       int localPort,
                       int timeout,
                       int sendBufferSize,
                       int receiveBufferSize,
                       int linger)
Parameters:
targetHost - The target host (String) parameter.
targetPort - The target port (int) parameter.
localPort - The local port (int) parameter.
timeout - The timeout (int) parameter.
sendBufferSize - The send buffer size (int) parameter.
receiveBufferSize - The receive buffer size (int) parameter.
linger - The linger (int) parameter.
See Also:
TcpipConnection(ConfigurationService), TcpipConnection(Dictionary), TcpipConnection(Socket), TcpipConnection(String,int), TcpipConnection(String,int,int), TcpipConnection(String,int,int,int), TcpipConnection(String,int,int,int,int,int), TcpipConnection(String,int,String,int,int,int,int,int)

TcpipConnection

public TcpipConnection(java.lang.String localHost,
                       int localPort,
                       java.lang.String targetHost,
                       int targetPort,
                       int timeout,
                       int sendBufferSize,
                       int receiveBufferSize,
                       int linger)
Constructs an instance of this class from the specified local host, local port, target host, target port, timeout, send buffer size, receive buffer size and linger parameters.

Parameters:
localHost - The local host (String) parameter.
localPort - The local port (int) parameter.
targetHost - The target host (String) parameter.
targetPort - The target port (int) parameter.
timeout - The timeout (int) parameter.
sendBufferSize - The send buffer size (int) parameter.
receiveBufferSize - The receive buffer size (int) parameter.
linger - The linger (int) parameter.
See Also:
TcpipConnection(ConfigurationService), TcpipConnection(Dictionary), TcpipConnection(Socket), TcpipConnection(String,int), TcpipConnection(String,int,int), TcpipConnection(String,int,int,int), TcpipConnection(String,int,int,int,int,int), TcpipConnection(String,int,int,int,int,int,int)
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 - IOException.
See Also:
ConnectionService.close()

exit

public void exit()
          throws java.io.IOException
Exit.

Specified by:
exit in interface ConnectionService
Overrides:
exit in class Connection
Throws:
java.io.IOException - IOException.

getPort

public java.net.Socket getPort()
Gets the port (Socket) value.

Returns:
The port (Socket) value.
See Also:
setPort(Socket)

isOpen

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

Specified by:
isOpen in interface ConnectionService
Overrides:
isOpen in class Connection
Returns:
The open (boolean) value.
See Also:
ConnectionService.isOpen(), Connection.setOpen(boolean)

open

public void open()
          throws java.io.IOException
Perform the open action method. 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 - IOException.
See Also:
ConnectionService.open()

setPort

public void setPort(java.net.Socket port)
Parameters:
port - The port (Socket) parameter.
See Also:
getPort()

toStringInfo

public void toStringInfo(java.lang.StringBuffer buffer)
Description copied from class: Connection
To string info with the specified buffer parameter.

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

2008-09-10 1.1.0

Copyright (c) 1999, 2008 IBM and others. See license in Legal section. OSGi Framework Version 3.4.0.v20080605-1900