2008-07-29 1.1.0

org.eclipse.soda.dk.transport
Class ConnectionTransport

java.lang.Object
  extended by org.eclipse.soda.dk.core.EscObject
      extended by org.eclipse.soda.dk.transport.Transport
          extended by org.eclipse.soda.dk.transport.ThreadTransport
              extended by org.eclipse.soda.dk.transport.ConnectionTransport
All Implemented Interfaces:
java.lang.Runnable, ConfigurationService, ConnectionTransportService, TransportService
Direct Known Subclasses:
ResponseTransport

public abstract class ConnectionTransport
extends ThreadTransport
implements ConnectionTransportService

The ConnectionTransport class implements the TransportService interface.

Version:
1.1.0
See Also:
Message, EscObject, ThreadTransport, Transport, ConnectionService, Runnable, TransportService

Field Summary
 
Fields inherited from class org.eclipse.soda.dk.transport.Transport
BAD_CHECKSUM_RESOURCE, CLONE_EXCEPTION_RESOURCE, CLOSE_EXCEPTION_RESOURCE, CONFIGURATION_ERROR_RESOURCE, CONFIGURATION_MISMATCH_RESOURCE, CONNECTION_IN_USE_EXCEPTION_RESOURCE, CR, DEFAULT_NO_ACTIVITY_TIMEOUT, DEFAULT_RETRY_TIME, ERROR_OCCURRED_EXCEPTION_RESOURCE, ERROR_ON_BUS_RESOURCE, errorCount, EXCEPTION_NO_RESPONSE_RESOURCE, history, inputMessageCount, INTERRUPT_BEFORE_WRITE_RESOURCE, INVALID_MESSAGE_RESOURCE, INVALID_SEQUENCE_RESOURCE, LF, logLevel, MESSAGE_FILTERED_RESOURCE, MESSAGE_RECEIVED_EXCEPTION_RESOURCE, MESSAGE_RECEIVED_RESOURCE, MESSAGE_SENT_RESOURCE, NACK_RECEIVED_RESOURCE, NO_ACTIVITY_RESOURCE, NO_ACTIVITY_STATUS_ERROR, NO_ACTIVITY_STATUS_MESSAGE_SENT, NO_ACTIVITY_STATUS_UNKNOWN, noActivityTimeout, notificationService, prefixMetrics, prefixStatus, PROCESS_INPUT_EXCEPTION_RESOURCE, QUEUE_TOO_BIG_RESOURCE, RECONNECT_RESOURCE, retryTime, RUN_EXCEPTION_RESOURCE, SEND_EXCEPTION_RESOURCE, SEND_NOT_STARTED_EXCEPTION_RESOURCE, sentMessageCount, SHUTDOWN_EXCEPTION_RESOURCE, STARTUP_EXCEPTION_RESOURCE, STARTUP_MESSAGE_RECEIVED_RESOURCE, STATE_STRINGS, stateChanaged, stateChangeCount, TRANSMIT_RETRIES_DEFAULT, TRANSPORT_ACTIVE_STATE_RESOURCE, TRANSPORT_ALIVE_STATE_RESOURCE, TRANSPORT_CHANGED_EXCEPTION_RESOURCE, TRANSPORT_CONNECTED_STATE_RESOURCE, TRANSPORT_CREATED_STATE_RESOURCE, TRANSPORT_DEAD_STATE_RESOURCE, TRANSPORT_ERROR_RESOURCE, TRANSPORT_STARTED_STATE_RESOURCE, TRANSPORT_STARTUP_EXCEPTION_RESOURCE, TRANSPORT_STATE_RESOURCE_TABLE, UNABLE_TO_CONNECTION_TO_BUS_RESOURCE, UNKNOWN_ERROR, WRITE_EXCEPTION_RESOURCE, WRITE_INTERRUPT_PENDING_RESOURCE, WRITE_INTERRUPT_RESOURCE
 
Fields inherited from class org.eclipse.soda.dk.core.EscObject
EMPTY_BYTES, EMPTY_STRING, 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
 
Fields inherited from interface org.eclipse.soda.dk.transport.service.TransportService
ACTIVE, ALIVE, CONFIGURATION_DATA_KEY, CONNECTED, CONNECTION_KEY, CREATED, DEAD, DEFAULT_CONNECTION, ERROR_COUNT_DATA_KEY, ID_KEY, INPUT_MESSAGE_COUNT_DATA_KEY, METRICS_EXTERNAL_KEY, NULL, SERVICE_NAME, SOURCE_DATA_KEY, STARTED, STATE_DATA_KEY, STATE_OLD_DATA_KEY, STATUS_EXTERNAL_KEY, TIMESTAMP_DATA_KEY, VALUE_DATA_KEY, VALUE_OLD_DATA_KEY
 
Constructor Summary
protected ConnectionTransport()
          Constructs an ConnectionTransport object.
 
Method Summary
 void close()
          Perform the close action method.
 void connect()
          Perform the connect action method.
 void exit()
          Exit.
 ConnectionService getConnection()
          Gets the ConnectionService connection property value.
abstract  ConnectionService getDefaultConnection()
          Gets the default connection (ConnectionService) value.
 int read(byte[] buffer, int offset, int length)
           
 void setConnection(ConnectionService connection)
          Sets the connection property.
 void setup()
          Setup the transport.
 void write(byte[] sendBytes)
          Perform the send action method.
 
Methods inherited from class org.eclipse.soda.dk.transport.ThreadTransport
getBufferSize, getShutdownTimeout, getThread, handleNoData, handleNoInput, isRunning, processInput, processInput, processInput, run, setRunning, setThread, shutdown, start, stop
 
Methods inherited from class org.eclipse.soda.dk.transport.Transport
addHistory, addInterest, addTransportListener, attemptRecoveryFromError, broadcastMetrics, broadcastStatus, configure, createController, finalize, fireErrorOccurred, fireMessageReceived, fireTransportChanged, getConfigurationInformation, getConfigurationInformation, getConfigurationService, getController, getErrorCount, getErrorSeverity, getHistory, getInformation, getInputMessageCount, getInterestMask, getKey, getLogDetails4, getLogDetails5, getLogLevel, getNoActivityTimeout, getNotificationPriority, getNotificationService, getPrefix, getPriority, getProperties, getQualifiedKey, getResource, getRetryTime, getSentMessageCount, getState, getStateChangeCount, getString, getStyle, getTransmitRetries, getTransportListener, handleError, hasListeners, isActive, isEcho, isReceivingData, isReceivingGoodData, isReceivingInput, isStarted, log, noActivityProcessing, noActivityProcessingMessage, prependPrefix, prependPrefix, putConfigurationInformation, removeInterest, removeTransportListener, restart, restartProcessing, send, send, setActive, setConfigurationInformation, setController, setEcho, setErrorCount, setHistory, setInformation, setInputMessageCount, setInterestMask, setLogLevel, setNoActivityTimeout, setNotificationService, setReceivingData, setReceivingData, setReceivingGoodData, setReceivingGoodData, setReceivingInput, setReceivingInput, setRetryTime, setSentMessageCount, setState, setStateChangeCount, setStyle, setTransmitRetries, setTransportListener, setupCustom, start, startup, startupMessageReceived, toString, updateErrorCount, updateInputMessageCount, updateSentMessageCount, waitStateChange, waitStateChange, write, writeAndReport, writeAndReport
 
Methods inherited from class org.eclipse.soda.dk.core.EscObject
createDefaultLogService, createException, createException, createInteger, createIntegerTable, createLong, createLongTable, createNumber, format, getBoolean, getCurrentTimestamp, getDefaultLogService, getDefaultResource, 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, getTraceLevel, getVmLibraryVersion, handleError, handleError, handleError, handleErrorInternal, handleStaticError, handleStaticException, isDebug, isLogging, isTrace, loadService, log, log, report, report, report, report, report, report, reportError, reportSystemInfo, setDebug, setDefaultLogService, setLogService, setTraceLevel, shouldLog, sleep, startupEscStatic, toStringConfigurationKeys, toStringInfo
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.soda.dk.transport.service.TransportService
addInterest, addTransportListener, getConfigurationInformation, getNotificationService, getState, removeInterest, removeTransportListener, send, setConfigurationInformation, setNotificationService, start, stop
 
Methods inherited from interface org.eclipse.soda.dk.core.service.ConfigurationService
getBoolean, getFloat, getInt, getLong, getObject
 

Constructor Detail

ConnectionTransport

protected ConnectionTransport()
Constructs an ConnectionTransport object.

Method Detail

close

public void close()
Perform the close action method.

Overrides:
close in class Transport

connect

public void connect()
             throws java.lang.Exception
Perform the connect action method.

Overrides:
connect in class Transport
Throws:
java.lang.Exception - Exception.

exit

public void exit()
Exit.

Specified by:
exit in interface TransportService
Overrides:
exit in class Transport

getConnection

public ConnectionService getConnection()
Gets the ConnectionService connection property value.

Specified by:
getConnection in interface ConnectionTransportService
Overrides:
getConnection in class Transport
Returns:
Results of the get connection (ConnectionService) value.
See Also:
getDefaultConnection(), setConnection(ConnectionService)

getDefaultConnection

public abstract ConnectionService getDefaultConnection()
Gets the default connection (ConnectionService) value.

Returns:
The default connection (ConnectionService) value.

read

public int read(byte[] buffer,
                int offset,
                int length)
         throws java.io.IOException
Overrides:
read in class Transport
Parameters:
buffer - The buffer (byte[]) parameter.
offset - The offset (int) parameter.
length - The length (int) parameter.
Returns:
Results of the read (int) value.
Throws:
java.io.IOException - IOException.

setConnection

public void setConnection(ConnectionService connection)
                   throws java.lang.IllegalArgumentException
Sets the connection property. The new property value (org.eclipse.soda.dk.tk.ConnectionService). condition occurs.

Specified by:
setConnection in interface ConnectionTransportService
Parameters:
connection - The connection (ConnectionService) parameter.
Throws:
java.lang.IllegalArgumentException - Illegal Argument Exception.
See Also:
getConnection(), getDefaultConnection()

setup

public void setup()
Description copied from class: Transport
Setup the transport.

Overrides:
setup in class Transport
See Also:
Transport.setup()

write

public void write(byte[] sendBytes)
           throws java.lang.Exception
Perform the send action method. byte[] href="java.io.IOException.html">IOException Thrown if the IOException exception condition occurs.

Specified by:
write in interface TransportService
Overrides:
write in class Transport
Parameters:
sendBytes - The send bytes (byte[]) parameter.
Throws:
java.lang.Exception - Exception.
See Also:
Transport.write(MessageService)

2008-07-29 1.1.0

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