1.0.0

org.eclipse.soda.dk.transport
Class ResponseTransport

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
                  extended by org.eclipse.soda.dk.transport.ResponseTransport
All Implemented Interfaces:
java.lang.Runnable, ConfigurationService, ConnectionTransportService, TransportService

public abstract class ResponseTransport
extends ConnectionTransport

The ResponseTransport class implements the TransportService interface.

Version:
1.0.0
See Also:
ConnectionTransport, Message, EscObject, ThreadTransport, Transport, Runnable, String, TransportService

Field Summary
protected  java.lang.Object readBlock
          Define the read block (Object) field.
protected  MessageService sentMessage
          Define the sent message (MessageService) field.
protected  java.lang.Object writeBlock
          Define the write block (Object) field.
 
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
ResponseTransport()
          Constructs an ResponseTransport object.
 
Method Summary
 void fireMessageReceived(java.lang.Object timestamp, MessageService message)
          Perform the fireMessageReceived action method.
 void fireMessageReceivedNoResponse(java.lang.Object timestamp, MessageService message)
          Fire message received no response with the specified timestamp and message parameters.
 long getDefaultResponseTimeout()
          Gets the long defaultResponseTimeout property value.
protected  byte[] getLastWriteBytes()
          Gets the byte[] last bytes written.
 long getResponseMessageCount()
          Gets the response message count (long) value.
 long getResponseTimeout()
          Gets the long responseTimeout property value.
 MessageService getSentMessage()
          Gets the sent message (MessageService) value.
 long getShutdownTimeout()
          Gets the shutdown timeout (long) value.
 void responseReceived()
          Response received.
protected  void setLastWriteBytes(byte[] lastWriteBytes)
          Sets the byte[] last bytes written.
 void setResponseMessageCount(long responseMessageCount)
          Sets the response message count value.
 void setResponseTimeout(long responseTimeout)
          Sets the responseTimeout property.
 void setSentMessage(MessageService sentMessage)
          Sets the sent message value.
 void setup()
          Setup the transport.
 long updateResponseMessageCount()
          Update response message count and return the long result.
 void write(byte[] sendBytes)
          Perform the write bytes method.
protected  void write(byte[] bytes, long responseTimeout)
          Perform the write method.
protected  void write(MessageService message)
          Write with the specified message parameter.
 
Methods inherited from class org.eclipse.soda.dk.transport.ConnectionTransport
close, connect, exit, getConnection, getDefaultConnection, read, setConnection
 
Methods inherited from class org.eclipse.soda.dk.transport.ThreadTransport
getBufferSize, 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, 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, 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
 

Field Detail

writeBlock

protected final java.lang.Object writeBlock
Define the write block (Object) field.


readBlock

protected final java.lang.Object readBlock
Define the read block (Object) field.


sentMessage

protected MessageService sentMessage
Define the sent message (MessageService) field.

Constructor Detail

ResponseTransport

public ResponseTransport()
Constructs an ResponseTransport object.

Method Detail

fireMessageReceived

public void fireMessageReceived(java.lang.Object timestamp,
                                MessageService message)
Description copied from class: Transport
Perform the fireMessageReceived action method. java.lang.Object org.eclipse.soda.dk.message.service.MessageService

Overrides:
fireMessageReceived in class Transport
Parameters:
timestamp - The timestamp (Object) parameter.
message - The message (MessageService) parameter.
See Also:
The timestamp (Object) parameter. The message (MessageService) parameter.

fireMessageReceivedNoResponse

public void fireMessageReceivedNoResponse(java.lang.Object timestamp,
                                          MessageService message)
Fire message received no response with the specified timestamp and message parameters. The timestamp (Object) parameter. The message (MessageService) parameter.

Parameters:
timestamp - The timestamp (Object) parameter.
message - The message (MessageService) parameter.

getDefaultResponseTimeout

public long getDefaultResponseTimeout()
Gets the long defaultResponseTimeout property value.

Returns:
Results of the get default response timeout (long) value.

getLastWriteBytes

protected byte[] getLastWriteBytes()
Gets the byte[] last bytes written.

Returns:
Results of the get last write bytes (byte[]) value.
See Also:
setLastWriteBytes(byte[])

getResponseMessageCount

public long getResponseMessageCount()
Gets the response message count (long) value.

Returns:
The response message count (long) value.
See Also:
setResponseMessageCount(long), updateResponseMessageCount()

getResponseTimeout

public long getResponseTimeout()
Gets the long responseTimeout property value.

Returns:
Results of the get response timeout (long) value.
See Also:
getDefaultResponseTimeout(), setResponseTimeout(long)

getSentMessage

public MessageService getSentMessage()
Gets the sent message (MessageService) value.

Returns:
The sent message (MessageService) value.
See Also:
setSentMessage(MessageService)

getShutdownTimeout

public long getShutdownTimeout()
Gets the shutdown timeout (long) value.

Overrides:
getShutdownTimeout in class ThreadTransport
Returns:
The shutdown timeout (long) value.

responseReceived

public void responseReceived()
Response received.

See Also:
fireMessageReceived(Object,MessageService)

setLastWriteBytes

protected void setLastWriteBytes(byte[] lastWriteBytes)
Sets the byte[] last bytes written. The last write bytes (byte[]) parameter.

Parameters:
lastWriteBytes - The last write bytes (byte[]) parameter.
See Also:
getLastWriteBytes()

setResponseMessageCount

public void setResponseMessageCount(long responseMessageCount)
Sets the response message count value. The response message count (long) parameter.

Parameters:
responseMessageCount - The response message count (long) parameter.
See Also:
getResponseMessageCount(), updateResponseMessageCount()

setResponseTimeout

public void setResponseTimeout(long responseTimeout)
Sets the responseTimeout property. The new property value (long).

Parameters:
responseTimeout - The response timeout (long) parameter.
See Also:
getDefaultResponseTimeout(), getResponseTimeout()

setSentMessage

public void setSentMessage(MessageService sentMessage)
Sets the sent message value. The sent message (MessageService) parameter.

Parameters:
sentMessage - The sent message (MessageService) parameter.
See Also:
getSentMessage()

setup

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

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

updateResponseMessageCount

public long updateResponseMessageCount()
Update response message count and return the long result.

Returns:
Results of the update response message count (long) value.
See Also:
getResponseMessageCount(), setResponseMessageCount(long)

write

public void write(byte[] sendBytes)
           throws java.lang.Exception
Perform the write bytes method. This is the lowest level write operation. Subclasses should not change override this method. The send bytes (byte[]) parameter.

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

write

protected void write(MessageService message)
              throws java.lang.Exception
Write with the specified message parameter. The message (MessageService) parameter.

Overrides:
write in class Transport
Parameters:
message - The message (MessageService) parameter.
Throws:
Exception.
java.lang.Exception
See Also:
write(byte[]), write(byte[],long)

write

protected void write(byte[] bytes,
                     long responseTimeout)
              throws java.lang.Exception
Perform the write method. This is the lowest level write operation. byte[] The response timeout (long) parameter.

Parameters:
bytes - The bytes (byte[]) parameter.
responseTimeout - The response timeout (long) parameter.
Throws:
java.lang.Exception
See Also:
write(byte[]), write(MessageService)

1.0.0

Copyright (c) 1999, 2007 IBM