1.0.0

org.eclipse.soda.dk.transport
Class Transport

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

public class Transport
extends EscObject
implements TransportService, ConfigurationService

The Transport class implements the TransportService interface.

Version:
1.0.0
See Also:
Message, EscObject, String, TransportService, TransportListener

Field Summary
protected static int BAD_CHECKSUM_RESOURCE
          Define the bad checksum resource (int) constant.
protected static int CLONE_EXCEPTION_RESOURCE
          Define the clone exception resource (int) constant.
protected static int CLOSE_EXCEPTION_RESOURCE
          Define the close exception resource (int) constant.
protected static int CONFIGURATION_ERROR_RESOURCE
          Define the configuration error resource (int) constant.
static int CONFIGURATION_MISMATCH_RESOURCE
          Define the configuration mismatch resource (int) constant.
protected static int CONNECTION_IN_USE_EXCEPTION_RESOURCE
          Define the send exception resource (int) constant.
static char CR
          Define the cr (char) constant.
static long DEFAULT_NO_ACTIVITY_TIMEOUT
          Define the default no activity timeout (long) constant.
static long DEFAULT_RETRY_TIME
          Define the default retry time (long) constant.
static int ERROR_OCCURRED_EXCEPTION_RESOURCE
          Define the error occurred exception resource (int) constant.
static int ERROR_ON_BUS_RESOURCE
          Define the error on bus resource (int) constant.
protected  int errorCount
          Define the error count (int) field.
protected static int EXCEPTION_NO_RESPONSE_RESOURCE
          Define the exception no response resource (int) constant.
protected  int inputMessageCount
          Define the input message count (int) field.
protected static int INTERRUPT_BEFORE_WRITE_RESOURCE
          Define the interrupt before write resource (int) constant.
protected static int INVALID_MESSAGE_RESOURCE
          Define the invalid message resource (int) constant.
protected static int INVALID_SEQUENCE_RESOURCE
          Define the invalid sequence resource (int) constant.
static char LF
          Define the lf (char) constant.
static int MESSAGE_FILTERED_RESOURCE
          Define the message filtered resource (int) constant.
static int MESSAGE_RECEIVED_EXCEPTION_RESOURCE
          Define the message received exception resource (int) constant.
static int MESSAGE_RECEIVED_RESOURCE
          Define the message received resource (int) constant.
static int MESSAGE_SENT_RESOURCE
          Define the message sent resource (int) constant.
protected static int NACK_RECEIVED_RESOURCE
          Define the nack received resource (int) constant.
protected static int NO_ACTIVITY_RESOURCE
          Define the no activity resource (int) constant.
protected  long noActivityTimeout
          Define the no activity timeout (long) field.
protected  NotificationService notificationService
          Define the notification service (NotificationService) field.
protected static int PROCESS_INPUT_EXCEPTION_RESOURCE
          Define the process input exception resource (int) constant.
protected static int QUEUE_TOO_BIG_RESOURCE
          Define the queue too big resource (int) constant.
static int RECONNECT_RESOURCE
          Define the reconnect resource (int) constant.
protected  long retryTime
          Define the retry time (long) field.
protected static int RUN_EXCEPTION_RESOURCE
          Define the run exception resource (int) constant.
protected static int SEND_EXCEPTION_RESOURCE
          Define the send exception resource (int) constant.
protected static int SEND_NOT_STARTED_EXCEPTION_RESOURCE
          Define the send not started exception resource (int) constant.
protected  int sentMessageCount
          Define the sent message count (int) field.
protected static int SHUTDOWN_EXCEPTION_RESOURCE
          Define the shutdown exception resource (int) constant.
protected static int STARTUP_EXCEPTION_RESOURCE
          Define the startup exception resource (int) constant.
static int STARTUP_MESSAGE_RECEIVED_RESOURCE
          Define the startup message received resource (int) constant.
static java.lang.String[] STATE_STRINGS
          Define strings for the various states.
protected  java.lang.Object stateChanaged
          Define the state chanaged (Object) field.
protected static int TRANSPORT_ACTIVE_STATE_RESOURCE
          Define the transport active state resource (int) constant.
protected static int TRANSPORT_ALIVE_STATE_RESOURCE
          Define the transport alive state resource (int) constant.
protected static int TRANSPORT_CHANGED_EXCEPTION_RESOURCE
          Define the transport changed exception resource (int) constant.
protected static int TRANSPORT_CONNECTED_STATE_RESOURCE
          Define the transport connected state resource (int) constant.
protected static int TRANSPORT_CREATED_STATE_RESOURCE
          Define the transport created state resource (int) constant.
protected static int TRANSPORT_DEAD_STATE_RESOURCE
          Define the transport dead state resource (int) constant.
static int TRANSPORT_ERROR_RESOURCE
          Define the transport error resource (int) constant.
protected static int TRANSPORT_STARTED_STATE_RESOURCE
          Define the transport started state resource (int) constant.
static int TRANSPORT_STARTUP_EXCEPTION_RESOURCE
          Define the transport startup exception resource (int) constant.
protected static int[] TRANSPORT_STATE_RESOURCE_TABLE
          Define the transport state resource table (int[]) constant.
static int UNABLE_TO_CONNECTION_TO_BUS_RESOURCE
          Define the unable to connection to bus resource (int) constant.
protected static int UNKNOWN_ERROR
          Define the unknown error (int) constant.
protected static int WRITE_EXCEPTION_RESOURCE
          Define the send exception resource (int) constant.
protected static int WRITE_INTERRUPT_PENDING_RESOURCE
          Define the write interrupt pending resource (int) constant.
protected static int WRITE_INTERRUPT_RESOURCE
          Define the write interrupt resource (int) constant.
 
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
Transport()
          Constructs a standard Transport object.
Transport(short style)
          Constructs an Transport object using the input parameter(s).
 
Method Summary
 void addInterest(InterestService interest)
          Add interest object.
 void addTransportListener(TransportListener transportListener)
          Adds the specified listener to receive listener controller.
protected  boolean attemptRecoveryFromError(int errorNumber, java.lang.Throwable error)
          Attempt recovery from error.
 void broadcastStatus(TransportService source, java.lang.Object timestamp, int newState, int oldState)
          Broadcast status with the specified source, timestamp, new state and old state parameters.
 void close()
          Perform the close action method.
 void configure()
          Perform the configure action method.
 void connect()
          Perform the connect action method.
 ControllerService createController()
          Create and return the noification object.
 void exit()
          Exit the transport.
protected  void finalize()
           
 void fireErrorOccurred(java.lang.Object timestamp, java.lang.Object data)
          Perform the fireErrorOccurred action method.
 void fireMessageReceived(java.lang.Object timestamp, MessageService message)
          Perform the fireMessageReceived action method.
 void fireTransportChanged(TransportService source, java.lang.Object timestamp, int newState, int oldState)
          This method will be called when the state of the TransportService changes to notify listeners of the changes.
 java.util.Dictionary getConfigurationInformation()
          Return the property table.
 java.lang.Object getConfigurationInformation(java.lang.String propertyName)
          Return the property value.
 ConfigurationService getConfigurationService()
          Gets the configuration service value.
 ConnectionService getConnection()
          Gets the ConnectionService connection property value.
 ControllerService getController()
          Gets the ControllerService property value.
 int getErrorCount()
          Gets the error count (int) value.
protected  int getErrorSeverity(int errorNumber, java.lang.Throwable error)
          Gets the error severity based on the error number and error input parameters.
protected  int getInformation()
          Gets the int information property value.
 int getInputMessageCount()
          Gets the input message count (int) value.
 InterestMasks getInterestMask()
          Returns the interestMask.
 java.lang.String getKey()
          Gets the key (String) value.
 java.lang.Object getLogDetails4()
          Gets the log details4 (Object) value.
 java.lang.Object getLogDetails5()
          Gets the log details5 (Object) value.
 long getNoActivityTimeout()
          Gets the no activity timeout (long) value.
 int getNotificationPriority()
          Gets the int controller thread priority property value.
 NotificationService getNotificationService()
          Gets the notification service value.
 int getPriority()
          Gets the int input thread priority property value.
 java.util.Dictionary getProperties()
          Gets the properties (Dictionary) value.
 java.lang.String getQualifiedKey()
          Gets the qualified key (String) value.
 java.lang.String getResource(int resourceId)
          Gets the string resource using the supplied resourceId.
 long getRetryTime()
          Gets the retry time in milliseconds.
 int getSentMessageCount()
          Gets the sent message count (int) value.
 int getState()
          Returns the state of the transport.
 java.lang.String getString(java.lang.String key, java.lang.String defaultString)
          Get string with the specified key and default string parameters and return the String result.
 short getStyle()
          Gets the short style property value.
protected  TransportListener getTransportListener()
          Gets the TransportListener transportListener property value.
protected  void handleError(java.lang.Throwable error, int resourceId, java.lang.Object[] objects)
          Handle error with the specified error, resource id and objects parameters.
 boolean hasListeners()
          Perform the hasListeners method and return the boolean result.
 boolean isActive()
          Return true if the transport the transport state is active.
 boolean isEcho()
          Gets the boolean isEcho property value.
 boolean isReceivingData()
          Gets the boolean receivingData property value.
 boolean isReceivingGoodData()
          Gets the boolean receivingGoodData property value.
 boolean isReceivingInput()
          Gets the boolean receivingInput property value.
 boolean isStarted()
          Return true if the transport the transport state is started.
 void log(int severity, java.lang.String message, java.lang.Throwable exception)
          Log with the specified severity, message and exception parameters.
 int noActivityProcessing()
          No activity processing and return the boolean result.
 MessageService noActivityProcessingMessage()
          No activity processing message and return the MessageService result.
 void putConfigurationInformation(java.lang.String propertyName, java.lang.Object value)
          Set the specified property value.
protected  int read(byte[] bytes, int offset, int length)
          Read with the specified bytes, offset and length parameters and return the int result.
 void removeInterest(InterestService interest)
          Remove an interest object from the transport.
 void removeTransportListener(TransportListener transportListener)
          Removes the specified listener from receiving listener controller.
 void restart()
          Restart the transport.
 void restartProcessing(boolean output)
          Restart processing.
 void send(byte[] sendBytes)
          Send bytes.
 void send(MessageService message)
          Perform the send action method.
 void setActive(boolean active)
          Set the active value.
 void setConfigurationInformation(java.util.Dictionary configurationInformation)
          Sets the configuration information value.
 void setController(ControllerService controller)
          Sets the controller property.
 void setEcho(boolean echo)
          Sets the isEcho property.
 void setErrorCount(int errorCount)
          Sets the error count value.
protected  void setInformation(int information)
          Sets the information property.
 void setInputMessageCount(int inputMessageCount)
          Sets the input message count value.
 void setInterestMask(InterestMasks interestMask)
          Sets the interestMask.
 void setNoActivityTimeout(long noActivityTimeout)
          Sets the no activity timeout value.
 void setNotificationService(NotificationService notificationService)
          Sets the notification service value.
 void setReceivingData()
          Perform the setReceivingData action method.
 void setReceivingData(boolean receivingData)
          Sets the receivingData property.
 void setReceivingGoodData()
          Perform the setReceivingGoodData action method.
 void setReceivingGoodData(boolean receivingGoodData)
          Sets the receivingGoodData property.
 void setReceivingInput()
          Perform the setReceivingInput action method.
 void setReceivingInput(boolean receivingInput)
          Sets the receivingInput property.
 void setRetryTime(long retryTime)
          Sets the retry time value.
 void setSentMessageCount(int sentMessageCount)
          Sets the sent message count value.
 void setState(int state)
          Sets the state of the tranport.
 void setStyle(short style)
          Sets the style property.
protected  void setTransportListener(TransportListener transportListener)
          Sets the transportListener property.
 void setup()
          Setup the transport.
 void setupCustom()
          Setup custom.
 void shutdown(boolean output)
          Perform the shutdown action method.
 void start()
          Start the transport.
 void start(boolean output)
          Start the transport.
 int startup(boolean output)
          Perform the startup action method.
 void startupMessageReceived(TransportService source, java.lang.Object timestamp, MessageService message)
          Startup message received with the specified source, timestamp and message parameters.
 void stop()
          Perform the stop action method.
 java.lang.String toString()
          Returns the string value.
 void updateErrorCount()
          Update error count.
 int updateInputMessageCount()
          Update input message count and return the int result.
 void updateSentMessageCount()
          Update sent message count.
 int waitStateChange()
          Wait for state changed.
 int waitStateChange(long timeout)
          Wait for state changed.
 void write(byte[] bytes)
          Write (send) the specified bytes.
protected  void write(MessageService message)
          Write (send) the specified message after converting the message to the correct set of bytes to be written.
 void writeAndReport(byte[] bytes)
          Write and report with the specified bytes parameter.
 void writeAndReport(MessageService message)
          Write and report with the specified message parameter.
 
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.core.service.ConfigurationService
getBoolean, getFloat, getInt, getLong, getObject
 

Field Detail

CR

public static final char CR
Define the cr (char) constant.

See Also:
Constant Field Values

LF

public static final char LF
Define the lf (char) constant.

See Also:
Constant Field Values

DEFAULT_RETRY_TIME

public static final long DEFAULT_RETRY_TIME
Define the default retry time (long) constant.

See Also:
Constant Field Values

DEFAULT_NO_ACTIVITY_TIMEOUT

public static final long DEFAULT_NO_ACTIVITY_TIMEOUT
Define the default no activity timeout (long) constant.

See Also:
Constant Field Values

TRANSPORT_DEAD_STATE_RESOURCE

protected static final int TRANSPORT_DEAD_STATE_RESOURCE
Define the transport dead state resource (int) constant.

See Also:
Constant Field Values

TRANSPORT_CREATED_STATE_RESOURCE

protected static final int TRANSPORT_CREATED_STATE_RESOURCE
Define the transport created state resource (int) constant.

See Also:
Constant Field Values

TRANSPORT_ALIVE_STATE_RESOURCE

protected static final int TRANSPORT_ALIVE_STATE_RESOURCE
Define the transport alive state resource (int) constant.

See Also:
Constant Field Values

TRANSPORT_CONNECTED_STATE_RESOURCE

protected static final int TRANSPORT_CONNECTED_STATE_RESOURCE
Define the transport connected state resource (int) constant.

See Also:
Constant Field Values

TRANSPORT_ACTIVE_STATE_RESOURCE

protected static final int TRANSPORT_ACTIVE_STATE_RESOURCE
Define the transport active state resource (int) constant.

See Also:
Constant Field Values

TRANSPORT_STARTED_STATE_RESOURCE

protected static final int TRANSPORT_STARTED_STATE_RESOURCE
Define the transport started state resource (int) constant.

See Also:
Constant Field Values

TRANSPORT_STATE_RESOURCE_TABLE

protected static final int[] TRANSPORT_STATE_RESOURCE_TABLE
Define the transport state resource table (int[]) constant.


STATE_STRINGS

public static final java.lang.String[] STATE_STRINGS
Define strings for the various states.


INVALID_MESSAGE_RESOURCE

protected static final int INVALID_MESSAGE_RESOURCE
Define the invalid message resource (int) constant.

See Also:
Constant Field Values

BAD_CHECKSUM_RESOURCE

protected static final int BAD_CHECKSUM_RESOURCE
Define the bad checksum resource (int) constant.

See Also:
Constant Field Values

TRANSPORT_STARTUP_EXCEPTION_RESOURCE

public static final int TRANSPORT_STARTUP_EXCEPTION_RESOURCE
Define the transport startup exception resource (int) constant.

See Also:
Constant Field Values

STARTUP_EXCEPTION_RESOURCE

protected static final int STARTUP_EXCEPTION_RESOURCE
Define the startup exception resource (int) constant.

See Also:
Constant Field Values

SHUTDOWN_EXCEPTION_RESOURCE

protected static final int SHUTDOWN_EXCEPTION_RESOURCE
Define the shutdown exception resource (int) constant.

See Also:
Constant Field Values

SEND_EXCEPTION_RESOURCE

protected static final int SEND_EXCEPTION_RESOURCE
Define the send exception resource (int) constant.

See Also:
Constant Field Values

RUN_EXCEPTION_RESOURCE

protected static final int RUN_EXCEPTION_RESOURCE
Define the run exception resource (int) constant.

See Also:
Constant Field Values

SEND_NOT_STARTED_EXCEPTION_RESOURCE

protected static final int SEND_NOT_STARTED_EXCEPTION_RESOURCE
Define the send not started exception resource (int) constant.

See Also:
Constant Field Values

PROCESS_INPUT_EXCEPTION_RESOURCE

protected static final int PROCESS_INPUT_EXCEPTION_RESOURCE
Define the process input exception resource (int) constant.

See Also:
Constant Field Values

TRANSPORT_ERROR_RESOURCE

public static final int TRANSPORT_ERROR_RESOURCE
Define the transport error resource (int) constant.

See Also:
Constant Field Values

CLOSE_EXCEPTION_RESOURCE

protected static final int CLOSE_EXCEPTION_RESOURCE
Define the close exception resource (int) constant.

See Also:
Constant Field Values

TRANSPORT_CHANGED_EXCEPTION_RESOURCE

protected static final int TRANSPORT_CHANGED_EXCEPTION_RESOURCE
Define the transport changed exception resource (int) constant.

See Also:
Constant Field Values

MESSAGE_RECEIVED_EXCEPTION_RESOURCE

public static final int MESSAGE_RECEIVED_EXCEPTION_RESOURCE
Define the message received exception resource (int) constant.

See Also:
Constant Field Values

ERROR_ON_BUS_RESOURCE

public static final int ERROR_ON_BUS_RESOURCE
Define the error on bus resource (int) constant.

See Also:
Constant Field Values

UNABLE_TO_CONNECTION_TO_BUS_RESOURCE

public static final int UNABLE_TO_CONNECTION_TO_BUS_RESOURCE
Define the unable to connection to bus resource (int) constant.

See Also:
Constant Field Values

ERROR_OCCURRED_EXCEPTION_RESOURCE

public static final int ERROR_OCCURRED_EXCEPTION_RESOURCE
Define the error occurred exception resource (int) constant.

See Also:
Constant Field Values

MESSAGE_RECEIVED_RESOURCE

public static final int MESSAGE_RECEIVED_RESOURCE
Define the message received resource (int) constant.

See Also:
Constant Field Values

MESSAGE_SENT_RESOURCE

public static final int MESSAGE_SENT_RESOURCE
Define the message sent resource (int) constant.

See Also:
Constant Field Values

STARTUP_MESSAGE_RECEIVED_RESOURCE

public static final int STARTUP_MESSAGE_RECEIVED_RESOURCE
Define the startup message received resource (int) constant.

See Also:
Constant Field Values

MESSAGE_FILTERED_RESOURCE

public static final int MESSAGE_FILTERED_RESOURCE
Define the message filtered resource (int) constant.

See Also:
Constant Field Values

CONFIGURATION_MISMATCH_RESOURCE

public static final int CONFIGURATION_MISMATCH_RESOURCE
Define the configuration mismatch resource (int) constant.

See Also:
Constant Field Values

RECONNECT_RESOURCE

public static final int RECONNECT_RESOURCE
Define the reconnect resource (int) constant.

See Also:
Constant Field Values

CONNECTION_IN_USE_EXCEPTION_RESOURCE

protected static final int CONNECTION_IN_USE_EXCEPTION_RESOURCE
Define the send exception resource (int) constant.

See Also:
Constant Field Values

WRITE_EXCEPTION_RESOURCE

protected static final int WRITE_EXCEPTION_RESOURCE
Define the send exception resource (int) constant.

See Also:
Constant Field Values

WRITE_INTERRUPT_RESOURCE

protected static final int WRITE_INTERRUPT_RESOURCE
Define the write interrupt resource (int) constant.

See Also:
Constant Field Values

WRITE_INTERRUPT_PENDING_RESOURCE

protected static final int WRITE_INTERRUPT_PENDING_RESOURCE
Define the write interrupt pending resource (int) constant.

See Also:
Constant Field Values

INVALID_SEQUENCE_RESOURCE

protected static final int INVALID_SEQUENCE_RESOURCE
Define the invalid sequence resource (int) constant.

See Also:
Constant Field Values

QUEUE_TOO_BIG_RESOURCE

protected static final int QUEUE_TOO_BIG_RESOURCE
Define the queue too big resource (int) constant.

See Also:
Constant Field Values

INTERRUPT_BEFORE_WRITE_RESOURCE

protected static final int INTERRUPT_BEFORE_WRITE_RESOURCE
Define the interrupt before write resource (int) constant.

See Also:
Constant Field Values

NACK_RECEIVED_RESOURCE

protected static final int NACK_RECEIVED_RESOURCE
Define the nack received resource (int) constant.

See Also:
Constant Field Values

NO_ACTIVITY_RESOURCE

protected static final int NO_ACTIVITY_RESOURCE
Define the no activity resource (int) constant.

See Also:
Constant Field Values

CONFIGURATION_ERROR_RESOURCE

protected static final int CONFIGURATION_ERROR_RESOURCE
Define the configuration error resource (int) constant.

See Also:
Constant Field Values

EXCEPTION_NO_RESPONSE_RESOURCE

protected static final int EXCEPTION_NO_RESPONSE_RESOURCE
Define the exception no response resource (int) constant.

See Also:
Constant Field Values

UNKNOWN_ERROR

protected static final int UNKNOWN_ERROR
Define the unknown error (int) constant.

See Also:
Constant Field Values

CLONE_EXCEPTION_RESOURCE

protected static final int CLONE_EXCEPTION_RESOURCE
Define the clone exception resource (int) constant.

See Also:
Constant Field Values

stateChanaged

protected final java.lang.Object stateChanaged
Define the state chanaged (Object) field.


retryTime

protected long retryTime
Define the retry time (long) field.


noActivityTimeout

protected long noActivityTimeout
Define the no activity timeout (long) field.


inputMessageCount

protected int inputMessageCount
Define the input message count (int) field.


errorCount

protected int errorCount
Define the error count (int) field.


sentMessageCount

protected int sentMessageCount
Define the sent message count (int) field.


notificationService

protected NotificationService notificationService
Define the notification service (NotificationService) field.

Constructor Detail

Transport

public Transport()
Constructs a standard Transport object.

See Also:
Transport(short)

Transport

public Transport(short style)
Constructs an Transport object using the input parameter(s). short

Parameters:
style - The style (short) parameter.
See Also:
Transport()
Method Detail

addInterest

public void addInterest(InterestService interest)
Add interest object.

Specified by:
addInterest in interface TransportService
Parameters:
interest - The interest (InterestService) parameter.
See Also:
The interest (InterestService) parameter., removeInterest(InterestService)

addTransportListener

public void addTransportListener(TransportListener transportListener)
Adds the specified listener to receive listener controller. The org.eclipse.soda.dk.transport.service.TransportServiceListener listener to be added.

Specified by:
addTransportListener in interface TransportService
Parameters:
transportListener - The transport listener (TransportListener) parameter.
See Also:
TransportService.addTransportListener(org.eclipse.soda.dk.transport.service.TransportListener), getTransportListener(), removeTransportListener(TransportListener), setTransportListener(TransportListener)

attemptRecoveryFromError

protected boolean attemptRecoveryFromError(int errorNumber,
                                           java.lang.Throwable error)
Attempt recovery from error.

Overrides:
attemptRecoveryFromError in class EscObject
Parameters:
errorNumber - The error number (int) parameter.
error - The error (Throwable) parameter.
Returns:
Results of the attempt recovery from error (boolean) value.
See Also:
The error number (int) parameter. The error (Throwable) parameter.

broadcastStatus

public void broadcastStatus(TransportService source,
                            java.lang.Object timestamp,
                            int newState,
                            int oldState)
Broadcast status with the specified source, timestamp, new state and old state parameters.

Parameters:
source - The source (TransportService) parameter.
timestamp - The timestamp (Object) parameter.
newState - The new state (int) parameter.
oldState - The old state (int) parameter.

close

public void close()
Perform the close action method.


configure

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

Throws:
java.lang.Exception

connect

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

Throws:
java.lang.Exception

createController

public ControllerService createController()
Create and return the noification object.

Returns:
Results of the create controller (ControllerService) value.
See Also:
getController(), setController(ControllerService)

exit

public void exit()
Exit the transport. After this method is called, the transport can not be restarted. Normally, the transport bundle activator should be the only object calling this method.

Specified by:
exit in interface TransportService

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable
See Also:
Object.finalize()

fireErrorOccurred

public void fireErrorOccurred(java.lang.Object timestamp,
                              java.lang.Object data)
Perform the fireErrorOccurred action method. java.lang.Object java.lang.Object

Parameters:
timestamp - The timestamp (Object) parameter.
data - The data (Object) parameter.

fireMessageReceived

public void fireMessageReceived(java.lang.Object timestamp,
                                MessageService message)
Perform the fireMessageReceived action method. java.lang.Object org.eclipse.soda.dk.message.service.MessageService

Parameters:
timestamp - The timestamp (Object) parameter.
message - The message (MessageService) parameter.
See Also:
startupMessageReceived(TransportService,Object,MessageService)

fireTransportChanged

public void fireTransportChanged(TransportService source,
                                 java.lang.Object timestamp,
                                 int newState,
                                 int oldState)
This method will be called when the state of the TransportService changes to notify listeners of the changes. org.eclipse.soda.dk.transport.service.TransportService java.lang.Object The new state of the TransportService. The old state of the TransportService.

Parameters:
source - The source (TransportService) parameter.
timestamp - The timestamp (Object) parameter.
newState - The new state (int) parameter.
oldState - The old state (int) parameter.

getConfigurationInformation

public java.lang.Object getConfigurationInformation(java.lang.String propertyName)
Return the property value. The property name (String) parameter.

Parameters:
propertyName - The property name (String) parameter.
Returns:
Results of the get configuration information (Object) value.
See Also:
getConfigurationInformation(), putConfigurationInformation(String,Object), setConfigurationInformation(Dictionary)

getConfigurationInformation

public java.util.Dictionary getConfigurationInformation()
Return the property table.

Specified by:
getConfigurationInformation in interface TransportService
Returns:
Results of the get configuration information (Dictionary) value.
See Also:
getConfigurationInformation(String), putConfigurationInformation(String,Object), setConfigurationInformation(Dictionary)

getConfigurationService

public ConfigurationService getConfigurationService()
Gets the configuration service value.

Overrides:
getConfigurationService in class EscObject
Returns:
The configuration service (ConfigurationService) value.

getConnection

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

Returns:
Results of the get connection (ConnectionService) value.

getController

public ControllerService getController()
Gets the ControllerService property value.

Returns:
Results of the get controller (ControllerService) value.
See Also:
createController(), setController(ControllerService)

getErrorCount

public int getErrorCount()
Gets the error count (int) value.

Returns:
The error count (int) value.
See Also:
setErrorCount(int), updateErrorCount()

getErrorSeverity

protected int getErrorSeverity(int errorNumber,
                               java.lang.Throwable error)
Gets the error severity based on the error number and error input parameters.

Overrides:
getErrorSeverity in class EscObject
Parameters:
errorNumber - The error number (int) parameter.
error - The error (Throwable) parameter.
Returns:
Results of the get error severity (int) value.
See Also:
The error number (int) parameter. The error (Throwable) parameter.

getInformation

protected int getInformation()
Gets the int information property value.

Returns:
Results of the get information (int) value.
See Also:
getConfigurationInformation(String), getConfigurationInformation(), putConfigurationInformation(String,Object), setConfigurationInformation(Dictionary), setInformation(int)

getInputMessageCount

public int getInputMessageCount()
Gets the input message count (int) value.

Returns:
The input message count (int) value.
See Also:
setInputMessageCount(int), updateInputMessageCount()

getInterestMask

public InterestMasks getInterestMask()
Returns the interestMask.

Returns:
Results of the get interest mask (InterestMasks) value.
See Also:
setInterestMask(InterestMasks)

getKey

public java.lang.String getKey()
Gets the key (String) value.

Returns:
The key (String) value.
See Also:
getQualifiedKey()

getLogDetails4

public java.lang.Object getLogDetails4()
Gets the log details4 (Object) value.

Overrides:
getLogDetails4 in class EscObject
Returns:
The log details4 (Object) value.

getLogDetails5

public java.lang.Object getLogDetails5()
Gets the log details5 (Object) value.

Overrides:
getLogDetails5 in class EscObject
Returns:
The log details5 (Object) value.

getNoActivityTimeout

public long getNoActivityTimeout()
Gets the no activity timeout (long) value.

Returns:
The no activity timeout (long) value.
See Also:
setNoActivityTimeout(long)

getNotificationPriority

public int getNotificationPriority()
Gets the int controller thread priority property value. The default value of the controller thread priority is input processing thread - 1. or Thread.NORM_PRIORITY + 1.

Returns:
int The controller thread priority

getNotificationService

public NotificationService getNotificationService()
Gets the notification service value.

Specified by:
getNotificationService in interface TransportService
Returns:
The notification service (NotificationService) value.
See Also:
setNotificationService(NotificationService)

getPriority

public int getPriority()
Gets the int input thread priority property value. The default value of the input thread priority is Thread.NORM_PRIORITY + 2.

Returns:
int The input processing thread priority
See Also:
getNotificationPriority()

getProperties

public java.util.Dictionary getProperties()
Gets the properties (Dictionary) value.

Specified by:
getProperties in interface ConfigurationService
Returns:
The properties (Dictionary) value.

getQualifiedKey

public java.lang.String getQualifiedKey()
Gets the qualified key (String) value.

Returns:
The qualified key (String) value.

getResource

public java.lang.String getResource(int resourceId)
Gets the string resource using the supplied resourceId. The resource id (int) parameter.

Overrides:
getResource in class EscObject
Parameters:
resourceId - The resource id (int) parameter.
Returns:
Results of the get resource (String) value.
See Also:
EscObject.getDefaultResource(int)

getRetryTime

public long getRetryTime()
Gets the retry time in milliseconds. This is the amount of time to wait before attempting to connect.

Returns:
Results of the get retry time (long) value.
See Also:
setRetryTime(long)

getSentMessageCount

public int getSentMessageCount()
Gets the sent message count (int) value.

Returns:
The sent message count (int) value.
See Also:
setSentMessageCount(int), updateSentMessageCount()

getState

public int getState()
Returns the state of the transport.

Specified by:
getState in interface TransportService
Returns:
Results of the get state (int) value.
See Also:
setState(int)

getString

public java.lang.String getString(java.lang.String key,
                                  java.lang.String defaultString)
Get string with the specified key and default string parameters and return the String result. The key (String) parameter. The default string (String) parameter.

Specified by:
getString in interface ConfigurationService
Overrides:
getString in class EscObject
Parameters:
key - The key (String) parameter.
defaultString - The default string (String) parameter.
Returns:
Results of the get string (String) value.
See Also:
toString()

getStyle

public short getStyle()
Gets the short style property value.

Return the number of bytes (not bit length) of the parameter.

Returns:
Results of the get style (short) value.
See Also:
setStyle(short)

getTransportListener

protected TransportListener getTransportListener()
Gets the TransportListener transportListener property value.

Returns:
Results of the get transport listener (TransportListener) value.
See Also:
addTransportListener(TransportListener), removeTransportListener(TransportListener), setTransportListener(TransportListener)

handleError

protected void handleError(java.lang.Throwable error,
                           int resourceId,
                           java.lang.Object[] objects)
Handle error with the specified error, resource id and objects parameters. The error (Throwable) parameter. The resource id (int) parameter. The objects (Object[]) parameter.

Overrides:
handleError in class EscObject
Parameters:
error - The error (Throwable) parameter.
resourceId - The resource id (int) parameter.
objects - The objects (Object[]) parameter.
See Also:
attemptRecoveryFromError(int,Throwable)

hasListeners

public boolean hasListeners()
Perform the hasListeners method and return the boolean result.

Returns:
Results of the has listeners (boolean) value.

isActive

public boolean isActive()
Return true if the transport the transport state is active.

Returns:
Results of the is active (boolean) value.
See Also:
setActive(boolean)

isEcho

public boolean isEcho()
Gets the boolean isEcho property value.

Returns:
Results of the is echo (boolean) value.
See Also:
setEcho(boolean)

isReceivingData

public boolean isReceivingData()
Gets the boolean receivingData property value.

Returns:
Results of the is receiving data (boolean) value.
See Also:
setReceivingData(), setReceivingData(boolean)

isReceivingGoodData

public boolean isReceivingGoodData()
Gets the boolean receivingGoodData property value.

Returns:
Results of the is receiving good data (boolean) value.
See Also:
setReceivingGoodData(), setReceivingGoodData(boolean)

isReceivingInput

public boolean isReceivingInput()
Gets the boolean receivingInput property value.

Returns:
Results of the is receiving input (boolean) value.
See Also:
setReceivingInput(), setReceivingInput(boolean)

isStarted

public boolean isStarted()
Return true if the transport the transport state is started.

Returns:
Results of the is started (boolean) value.

log

public void log(int severity,
                java.lang.String message,
                java.lang.Throwable exception)
Log with the specified severity, message and exception parameters. The severity (int) parameter. The message (String) parameter. The exception (Throwable) parameter.

Overrides:
log in class EscObject
Parameters:
severity - The severity (int) parameter.
message - The message (String) parameter.
exception - The exception (Throwable) parameter.
See Also:
EscObject.log(int,String)

noActivityProcessing

public int noActivityProcessing()
No activity processing and return the boolean result.

Returns:
true if you should re-connect.

noActivityProcessingMessage

public MessageService noActivityProcessingMessage()
No activity processing message and return the MessageService result.

Returns:
Results of the no activity processing message (MessageService) value.

putConfigurationInformation

public void putConfigurationInformation(java.lang.String propertyName,
                                        java.lang.Object value)
Set the specified property value. The property name (String) parameter. The value (Object) parameter.

Parameters:
propertyName - The property name (String) parameter.
value - The value (Object) parameter.
See Also:
getConfigurationInformation(String), getConfigurationInformation(), setConfigurationInformation(Dictionary)

read

protected 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. The bytes (byte[]) parameter. The offset (int) parameter. The length (int) parameter.

Parameters:
bytes - The bytes (byte[]) parameter.
offset - The offset (int) parameter.
length - The length (int) parameter.
Returns:
Results of the read (int) value.
Throws:
IOException.
java.io.IOException

removeInterest

public void removeInterest(InterestService interest)
Description copied from interface: TransportService
Remove an interest object from the transport. The inrerest object to remove from the transport.

Specified by:
removeInterest in interface TransportService
Parameters:
interest - The interest (InterestService) parameter.
See Also:
The interest (InterestService) parameter., addInterest(InterestService)

removeTransportListener

public void removeTransportListener(TransportListener transportListener)
Removes the specified listener from receiving listener controller. The org.eclipse.soda.dk.transport.service.TransportServiceListener listener to be removed.

Specified by:
removeTransportListener in interface TransportService
Parameters:
transportListener - The transport listener (TransportListener) parameter.
See Also:
TransportService.removeTransportListener(org.eclipse.soda.dk.transport.service.TransportListener), addTransportListener(TransportListener), getTransportListener(), setTransportListener(TransportListener)

restart

public void restart()
Restart the transport.


restartProcessing

public void restartProcessing(boolean output)
Restart processing. if true, then output errors

Parameters:
output - The output (boolean) parameter.
See Also:
noActivityProcessing()

send

public void send(MessageService message)
Perform the send action method. This method is called send a device message to the transport. org.eclipse.soda.dk.message.service.MessageService

Specified by:
send in interface TransportService
Parameters:
message - The message (MessageService) parameter.
See Also:
TransportService.send(org.eclipse.soda.dk.message.service.MessageService), send(byte[])

send

public void send(byte[] sendBytes)
          throws java.io.IOException
Send bytes. This method is called send a transport message to the transport.

Parameters:
sendBytes - The send bytes (byte[]) parameter.
Throws:
java.io.IOException
See Also:
The send bytes (byte[]) parameter., send(MessageService)

setActive

public void setActive(boolean active)
Set the active value. The active (boolean) parameter.

Parameters:
active - The active (boolean) parameter.
See Also:
isActive()

setConfigurationInformation

public void setConfigurationInformation(java.util.Dictionary configurationInformation)
Sets the configuration information value. The configuration information (Dictionary) parameter.

Specified by:
setConfigurationInformation in interface TransportService
Parameters:
configurationInformation - The configuration information (Dictionary) parameter.
See Also:
getConfigurationInformation(String), getConfigurationInformation(), putConfigurationInformation(String,Object)

setController

public void setController(ControllerService controller)
Sets the controller property. The new property value (ControllerService).

Parameters:
controller - The controller (ControllerService) parameter.
See Also:
createController(), getController()

setEcho

public void setEcho(boolean echo)
Sets the isEcho property. The new property value (boolean).

Parameters:
echo - The echo (boolean) parameter.
See Also:
isEcho()

setErrorCount

public void setErrorCount(int errorCount)
Sets the error count value. The error count (int) parameter.

Parameters:
errorCount - The error count (int) parameter.
See Also:
getErrorCount(), updateErrorCount()

setInformation

protected void setInformation(int information)
Sets the information property. The new property value (int).

Parameters:
information - The information (int) parameter.
See Also:
getConfigurationInformation(String), getConfigurationInformation(), getInformation(), putConfigurationInformation(String,Object), setConfigurationInformation(Dictionary)

setInputMessageCount

public void setInputMessageCount(int inputMessageCount)
Sets the input message count value. The input message count (int) parameter.

Parameters:
inputMessageCount - The input message count (int) parameter.
See Also:
getInputMessageCount(), updateInputMessageCount()

setInterestMask

public void setInterestMask(InterestMasks interestMask)
Sets the interestMask. The interestMask to set

Parameters:
interestMask - The interest mask (InterestMasks) parameter.
See Also:
getInterestMask()

setNoActivityTimeout

public void setNoActivityTimeout(long noActivityTimeout)
Sets the no activity timeout value. The no activity timeout (long) parameter.

Parameters:
noActivityTimeout - The no activity timeout (long) parameter.
See Also:
getNoActivityTimeout()

setNotificationService

public void setNotificationService(NotificationService notificationService)
Sets the notification service value. The notification service (NotificationService) parameter.

Specified by:
setNotificationService in interface TransportService
Parameters:
notificationService - The notification service (NotificationService) parameter.
See Also:
getNotificationService()

setReceivingData

public void setReceivingData()
Perform the setReceivingData action method.

See Also:
isReceivingData(), setReceivingData(boolean)

setReceivingData

public void setReceivingData(boolean receivingData)
Sets the receivingData property. The new property value (boolean).

Parameters:
receivingData - The receiving data (boolean) parameter.
See Also:
isReceivingData(), setReceivingData()

setReceivingGoodData

public void setReceivingGoodData()
Perform the setReceivingGoodData action method.

See Also:
isReceivingGoodData(), setReceivingGoodData(boolean)

setReceivingGoodData

public void setReceivingGoodData(boolean receivingGoodData)
Sets the receivingGoodData property. The new property value (boolean).

Parameters:
receivingGoodData - The receiving good data (boolean) parameter.
See Also:
isReceivingGoodData(), setReceivingGoodData()

setReceivingInput

public void setReceivingInput()
Perform the setReceivingInput action method.

See Also:
isReceivingInput(), setReceivingInput(boolean)

setReceivingInput

public void setReceivingInput(boolean receivingInput)
Sets the receivingInput property. The new property value (boolean).

Parameters:
receivingInput - The receiving input (boolean) parameter.
See Also:
isReceivingInput(), setReceivingInput()

setRetryTime

public void setRetryTime(long retryTime)
Sets the retry time value. The retry time (long) parameter.

Parameters:
retryTime - The retry time (long) parameter.
See Also:
getRetryTime()

setSentMessageCount

public void setSentMessageCount(int sentMessageCount)
Sets the sent message count value. The sent message count (int) parameter.

Parameters:
sentMessageCount - The sent message count (int) parameter.
See Also:
getSentMessageCount(), updateSentMessageCount()

setState

public void setState(int state)
Sets the state of the tranport. The state (int) parameter.

Parameters:
state - The state (int) parameter.
See Also:
getState()

setStyle

public void setStyle(short style)
Sets the style property.

Return the number of bytes (not bit length) of the parameter. The new property value (short).

Parameters:
style - The style (short) parameter.
See Also:
getStyle()

setTransportListener

protected void setTransportListener(TransportListener transportListener)
Sets the transportListener property. The new property value (org.eclipse.soda.dk.transport.service.TransportServiceListener).

Parameters:
transportListener - The transport listener (TransportListener) parameter.
See Also:
addTransportListener(TransportListener), getTransportListener(), removeTransportListener(TransportListener)

setup

public void setup()
Setup the transport.


setupCustom

public void setupCustom()
Setup custom.


shutdown

public void shutdown(boolean output)
Perform the shutdown action method. This method is called to shutdown the transport. If you overrite this method, you should call you superclass after your shutdown logic. param boolean output If true, then output an errors. The output (boolean) parameter.

Parameters:
output - The output (boolean) parameter.

start

public void start()
Start the transport. Instead of overriding this method, override the startup method.

Specified by:
start in interface TransportService
See Also:
TransportService.start(), start(boolean)

start

public void start(boolean output)
Start the transport. The output (boolean) parameter.

Parameters:
output - The output (boolean) parameter.
See Also:
start()

startup

public int startup(boolean output)
            throws java.lang.Exception
Perform the startup action method. This method is called to startup the transport. If you overrite this method, you should call you superclass before your startup logic. param boolean output If true, then output an errors. The output (boolean) parameter.

Parameters:
output - The output (boolean) parameter.
Returns:
Results of the startup (int) value.
Throws:
java.lang.Exception

startupMessageReceived

public void startupMessageReceived(TransportService source,
                                   java.lang.Object timestamp,
                                   MessageService message)
Startup message received with the specified source, timestamp and message parameters. The source (TransportService) parameter. The timestamp (Object) parameter. The message (MessageService) parameter.

Parameters:
source - The source (TransportService) parameter.
timestamp - The timestamp (Object) parameter.
message - The message (MessageService) parameter.
See Also:
fireMessageReceived(Object,MessageService)

stop

public void stop()
Perform the stop action method. Instead of overriding this method, override the shutdown method.

Specified by:
stop in interface TransportService
See Also:
TransportService.stop()

toString

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

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

updateErrorCount

public void updateErrorCount()
Update error count.

See Also:
getErrorCount(), setErrorCount(int)

updateInputMessageCount

public int updateInputMessageCount()
Update input message count and return the int result.

Returns:
Results of the update input message count (int) value.
See Also:
getInputMessageCount(), setInputMessageCount(int)

updateSentMessageCount

public void updateSentMessageCount()
Update sent message count.

See Also:
getSentMessageCount(), setSentMessageCount(int)

waitStateChange

public int waitStateChange()
Wait for state changed.

Returns:
current state.
See Also:
waitStateChange(long)

waitStateChange

public int waitStateChange(long timeout)
Wait for state changed. The timeout value to wait.

Parameters:
timeout - The timeout (long) parameter.
Returns:
current state.
See Also:
waitStateChange()

write

public void write(byte[] bytes)
           throws java.lang.Exception
Write (send) the specified bytes. Normally, specific implementation of a transport service should not override this method. byte[]

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

write

protected void write(MessageService message)
              throws java.lang.Exception
Write (send) the specified message after converting the message to the correct set of bytes to be written. This is the method common method to be overridden by subclasses to convert a message to the correct set of bytes to be written. The message to be written (sent).

Parameters:
message - The message (MessageService) parameter.
Throws:
java.lang.Exception
See Also:
write(byte[])

writeAndReport

public void writeAndReport(MessageService message)
Write and report with the specified message parameter. The message (MessageService) parameter.

Parameters:
message - The message (MessageService) parameter.
See Also:
writeAndReport(byte[])

writeAndReport

public void writeAndReport(byte[] bytes)
Write and report with the specified bytes parameter. The bytes (byte[]) parameter.

Parameters:
bytes - The bytes (byte[]) parameter.
See Also:
writeAndReport(MessageService)

1.0.0

Copyright (c) 1999, 2007 IBM