2009-01-09 1.2.0

org.eclipse.soda.dk.connection
Class TraceConnection

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.TraceConnection
All Implemented Interfaces:
ConnectionService, MultiplexConnectionService

public class TraceConnection
extends Connection
implements MultiplexConnectionService

Since:
1.0
Version:
1.2.0

Field Summary
 
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, 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, Unmodifiable
 
Fields inherited from interface org.eclipse.soda.dk.multiplex.connection.service.MultiplexConnectionService
SERVICE_NAME
 
Fields inherited from interface org.eclipse.soda.dk.connection.service.ConnectionService
CONNECTION_DEFAULT, CONNECTION_KEY, CONNECTION_TYPE, DEFAULT_CONNECTION
 
Constructor Summary
TraceConnection(ConnectionService connectionService)
          Constructs an instance of this class from the specified connection service parameter.
 
Method Summary
 void close()
          Close.
 void exit()
          Exit.
 void flush()
          Flush.
 ChannelService getChannel(java.lang.String channelId)
          Get channel with the specified channel id parameter and return the ChannelService result.
 java.util.Map getChannels()
          Gets the channels (Map) value.
 MultiplexConnectionListener getConnectionListener()
          Gets the channel listener value.
 ConnectionService getConnectionService()
          Gets the connection service value.
 MultiplexConnectionService getMultiplexConnectionService()
          Gets the channel service value.
 boolean isOpen()
          Gets the open (boolean) value.
 void open()
          Open.
 ChannelService openChannel(java.util.Map parameters)
          Open channel with the specified channel spec parameter and return the ChannelService result.
 void processEvents()
          Process events.
 int read(byte[] bytes)
          Read with the specified bytes parameter and return the int result.
 int read(byte[] bytes, int offset, int length)
          Read with the specified bytes, offset and length parameters and return the int result.
 int read(ChannelService channel, byte[] bytes)
          Read with the specified channel and bytes parameters and return the int result.
 int read(ChannelService channel, byte[] bytes, int offset, int length)
          Read with the specified channel, bytes, offset and length parameters and return the int result.
 void setConnectionListener(MultiplexConnectionListener listener)
          Sets the channel listener value.
 void setConnectionService(ConnectionService connectionService)
          Sets the connection service value.
 java.lang.String toString()
          Returns the string value.
 void write(byte[] bytes)
          Write with the specified bytes parameter.
 void write(byte[] bytes, int offset, int count)
          Write with the specified bytes, offset and count parameters.
 void write(ChannelService channel, byte[] bytes)
          Write with the specified channel and bytes parameters.
 void write(ChannelService channel, byte[] bytes, int offset, int count)
          Write with the specified channel, bytes, offset and count parameters.
 
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, toStringInfo, updateReadByteCount, updateWriteByteCount
 
Methods inherited from class org.eclipse.soda.dk.core.EscObject
createBoolean, createDefaultLogService, createException, createException, createInteger, createIntegerTable, createLong, createLongTable, createNumber, format, getBoolean, getByte, getChar, getCurrentTimestamp, getDefaultLogService, getDouble, getFloat, getId, getIdName, getInt, getLoadLibraryName, getLogDetails, getLogDetails, getLogDetails0, getLogDetails1, getLogDetails2, getLogDetails3, getLogDetails6, getLogDetails7, getLogService, getLong, getObject, getOutputName, getReadOnlyEmptyCollection, getReadOnlyEmptyList, getReadOnlyEmptyMap, getShort, getSimpleClassName, getStaticBoolean, getStaticByte, getStaticChar, getStaticDouble, getStaticFloat, getStaticInt, getStaticLong, getStaticObject, getStaticShort, 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, report, reportError, reportSystemInfo, setBackward, setDebug, setDefaultLogService, setLogService, setTraceLevel, setUnmodifiable, shouldLog, sleep, startupEscStatic, 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
setConfigurationInformation
 

Constructor Detail

TraceConnection

public TraceConnection(ConnectionService connectionService)
Constructs an instance of this class from the specified connection service parameter. The connection service (ConnectionService) parameter.

Parameters:
connectionService - The connection service (ConnectionService) parameter.
Method Detail

close

public void close()
           throws java.io.IOException
Close.

Specified by:
close in interface ConnectionService
Overrides:
close in class Connection
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.

flush

public void flush()
           throws java.io.IOException
Flush.

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

getChannel

public ChannelService getChannel(java.lang.String channelId)
Get channel with the specified channel id parameter and return the ChannelService result.

Specified by:
getChannel in interface MultiplexConnectionService
Parameters:
channelId - The channel ID (String) parameter.
Returns:
Results of the get channel (ChannelService) value.
Since:
1.2
See Also:
openChannel(Map)

getChannels

public java.util.Map getChannels()
Gets the channels (Map) value.

Specified by:
getChannels in interface MultiplexConnectionService
Returns:
The channels (Map) value.
Since:
1.2

getConnectionListener

public MultiplexConnectionListener getConnectionListener()
Gets the channel listener value.

Specified by:
getConnectionListener in interface MultiplexConnectionService
Returns:
The channel listener (MultiplexConnectionListener) value.
Since:
1.2
See Also:
setConnectionListener(MultiplexConnectionListener)

getConnectionService

public ConnectionService getConnectionService()
Gets the connection service value.

Returns:
The connection service (ConnectionService) value.
See Also:
getMultiplexConnectionService(), setConnectionService(ConnectionService)

getMultiplexConnectionService

public MultiplexConnectionService getMultiplexConnectionService()
Gets the channel service value.

Returns:
The channel service (MultiplexConnectionService) value.
Since:
1.2

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
Open.

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

openChannel

public ChannelService openChannel(java.util.Map parameters)
                           throws java.io.IOException
Open channel with the specified channel spec parameter and return the ChannelService result.

Specified by:
openChannel in interface MultiplexConnectionService
Parameters:
parameters - The parameters (Map) parameter.
Returns:
Results of the open channel (ChannelService) value.
Throws:
java.io.IOException - IOException.
Since:
1.2
See Also:
getChannel(String)

processEvents

public void processEvents()
                   throws java.lang.Exception
Process events.

Specified by:
processEvents in interface MultiplexConnectionService
Throws:
java.lang.Exception - Exception.
Since:
1.2

read

public int read(byte[] bytes)
         throws java.io.IOException
Read with the specified bytes parameter and return the int result.

Specified by:
read in interface ConnectionService
Overrides:
read in class Connection
Parameters:
bytes - The bytes (byte[]) parameter.
Returns:
Results of the read (int) value.
Throws:
java.io.IOException - IOException.
See Also:
read(byte[],int,int), read(ChannelService,byte[]), read(ChannelService,byte[],int,int)

read

public int read(byte[] bytes,
                int offset,
                int length)
         throws java.io.IOException
Read with the specified bytes, offset and length parameters and return the int result.

Specified by:
read in interface ConnectionService
Parameters:
bytes - The bytes (byte[]) parameter.
offset - The offset (int) parameter.
length - The length (int) parameter.
Returns:
Results of the read (int) value.
Throws:
java.io.IOException - IOException.
See Also:
read(byte[]), read(ChannelService,byte[]), read(ChannelService,byte[],int,int)

read

public int read(ChannelService channel,
                byte[] bytes)
         throws java.io.IOException
Read with the specified channel and bytes parameters and return the int result.

Specified by:
read in interface MultiplexConnectionService
Parameters:
channel - The channel (ChannelService) parameter.
bytes - The bytes (byte[]) parameter.
Returns:
Results of the read (int) value.
Throws:
java.io.IOException - IOException.
Since:
1.2
See Also:
read(byte[]), read(byte[],int,int), read(ChannelService,byte[],int,int)

read

public int read(ChannelService channel,
                byte[] bytes,
                int offset,
                int length)
         throws java.io.IOException
Read with the specified channel, bytes, offset and length parameters and return the int result.

Specified by:
read in interface MultiplexConnectionService
Parameters:
channel - The channel (ChannelService) parameter.
bytes - The bytes (byte[]) parameter.
offset - The offset (int) parameter.
length - The length (int) parameter.
Returns:
Results of the read (int) value.
Throws:
java.io.IOException - IOException.
Since:
1.2
See Also:
read(byte[]), read(byte[],int,int), read(ChannelService,byte[])

setConnectionListener

public void setConnectionListener(MultiplexConnectionListener listener)
Sets the channel listener value.

Specified by:
setConnectionListener in interface MultiplexConnectionService
Parameters:
listener - The listener (MultiplexConnectionListener) parameter.
Since:
1.2
See Also:
getConnectionListener()

setConnectionService

public void setConnectionService(ConnectionService connectionService)
                          throws java.lang.IllegalArgumentException
Sets the connection service value.

Parameters:
connectionService - The connection service (ConnectionService) parameter.
Throws:
java.lang.IllegalArgumentException - Illegal Argument Exception.
See Also:
getConnectionService(), getMultiplexConnectionService()

toString

public java.lang.String toString()
Returns the string value.

Overrides:
toString in class EscObject
Returns:
The string (String) value.
See Also:
EscObject.getStaticString(String,String), EscObject.getString(String,String)

write

public void write(byte[] bytes)
           throws java.io.IOException
Write with the specified bytes parameter.

Specified by:
write in interface ConnectionService
Overrides:
write in class Connection
Parameters:
bytes - The bytes (byte[]) parameter.
Throws:
java.io.IOException - IOException.
See Also:
write(byte[],int,int), write(ChannelService,byte[]), write(ChannelService,byte[],int,int)

write

public void write(byte[] bytes,
                  int offset,
                  int count)
           throws java.io.IOException
Write with the specified bytes, offset and count parameters.

Specified by:
write in interface ConnectionService
Parameters:
bytes - The bytes (byte[]) parameter.
offset - The offset (int) parameter.
count - The count (int) parameter.
Throws:
java.io.IOException - IOException.
See Also:
write(byte[]), write(ChannelService,byte[]), write(ChannelService,byte[],int,int)

write

public void write(ChannelService channel,
                  byte[] bytes)
           throws java.io.IOException
Write with the specified channel and bytes parameters.

Specified by:
write in interface MultiplexConnectionService
Parameters:
channel - The channel (ChannelService) parameter.
bytes - The bytes (byte[]) parameter.
Throws:
java.io.IOException - IOException.
Since:
1.2
See Also:
write(byte[]), write(byte[],int,int), write(ChannelService,byte[],int,int)

write

public void write(ChannelService channel,
                  byte[] bytes,
                  int offset,
                  int count)
           throws java.io.IOException
Write with the specified channel, bytes, offset and count parameters.

Specified by:
write in interface MultiplexConnectionService
Parameters:
channel - The channel (ChannelService) parameter.
bytes - The bytes (byte[]) parameter.
offset - The offset (int) parameter.
count - The count (int) parameter.
Throws:
java.io.IOException - IOException.
Since:
1.2
See Also:
write(byte[]), write(byte[],int,int), write(ChannelService,byte[])

2009-01-09 1.2.0

Copyright (c) 2009 IBM. See license in Legal section.