1.0.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.0.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, inputMessageCount, INTERRUPT_BEFORE_WRITE_RESOURCE, INVALID_MESSAGE_RESOURCE, INVALID_SEQUENCE_RESOURCE, LF, MESSAGE_FILTERED_RESOURCE, MESSAGE_RECEIVED_EXCEPTION_RESOURCE, MESSAGE_RECEIVED_RESOURCE, MESSAGE_SENT_RESOURCE, NACK_RECEIVED_RESOURCE, NO_ACTIVITY_RESOURCE, noActivityTimeout, notificationService, 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, 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, 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.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, 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
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)
          Perform the read method and return the int result.
 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
addInterest, addTransportListener, attemptRecoveryFromError, broadcastStatus, configure, createController, finalize, fireErrorOccurred, fireMessageReceived, fireTransportChanged, getConfigurationInformation, getConfigurationInformation, getConfigurationService, getController, getErrorCount, getErrorSeverity, getInformation, getInputMessageCount, getInterestMask, getKey, getLogDetails4, getLogDetails5, getNoActivityTimeout, getNotificationPriority, getNotificationService, getPriority, getProperties, getQualifiedKey, getResource, getRetryTime, getSentMessageCount, getState, getString, getStyle, getTransportListener, handleError, hasListeners, isActive, isEcho, isReceivingData, isReceivingGoodData, isReceivingInput, isStarted, log, noActivityProcessing, noActivityProcessingMessage, putConfigurationInformation, removeInterest, removeTransportListener, restart, restartProcessing, send, send, setActive, setConfigurationInformation, setController, setEcho, setErrorCount, setInformation, setInputMessageCount, setInterestMask, setNoActivityTimeout, setNotificationService, setReceivingData, setReceivingData, setReceivingGoodData, setReceivingGoodData, setReceivingInput, setReceivingInput, setRetryTime, setSentMessageCount, setState, setStyle, 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, createNumber, format, getBoolean, getCurrentTimestamp, getDefaultLogService, getDefaultResource, getFloat, getInt, getLoadLibraryName, getLogDetails, getLogDetails0, getLogDetails1, getLogDetails2, getLogDetails3, getLogDetails6, getLogDetails7, getLogService, getLong, getObject, getOutputName, getSimpleClassName, getStaticBoolean, getStaticFloat, getStaticInt, getStaticLong, getStaticObject, getStaticString, getTraceLevel, getVmLibraryVersion, handleError, handleError, handleStaticError, handleStaticException, isDebug, isTrace, loadService, 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

public 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

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
Perform the read method and return the int result. byte[] href="java.io.IOException.html">IOException Thrown if the IOException exception condition occurs. The offset (int) parameter. The length (int) parameter.

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

setConnection

public void setConnection(ConnectionService connection)
                   throws java.lang.IllegalArgumentException
Sets the connection property. The new property value (org.eclipse.soda.dk.tk.ConnectionService). href="java.lang.IllegalArgumentException.html">IllegalArgumentException Thrown if the IllegalArgumentException exception 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
See Also:
Transport.write(MessageService)

1.0.0

Copyright (c) 1999, 2007 IBM