1.0.0

org.eclipse.soda.dk.transport
Class Controller

java.lang.Object
  extended by java.util.AbstractCollection
      extended by java.util.AbstractList
          extended by java.util.Vector
              extended by org.eclipse.soda.dk.transport.Controller
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.lang.Runnable, java.util.Collection, java.util.List, java.util.RandomAccess, ControllerService, ErrorListener, MessageListener, TransportListener

public class Controller
extends java.util.Vector
implements ControllerService, java.lang.Runnable

The Controller class implements the ControllerService interface.

Version:
1.0.0
See Also:
Serialized Form

Field Summary
static java.lang.Integer TRANSPORT_STARTED_NO_OUTPUT
          Define the transport started value no output (Integer) constant.
static java.lang.Integer TRANSPORT_STARTED_VALUE
          Define the transport started value (Integer) constant.
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Controller(Transport transport, int priority)
          Constructs a standard Notification object.
 
Method Summary
 void enqueue(java.lang.Object object)
          Perform the enqueue action method.
 void enqueueFirst(java.lang.Object object)
          Perform the enqueueFirst action method.
protected  void enqueueRestartTransport()
          Enqueue restart transport.
protected  void enqueueRestartTransportNoOutput()
          Enqueue restart transport no output.
 void errorOccurred(java.lang.Object source, java.lang.Object timestamp, java.lang.Object data)
          The errorOccurred method is called when an error has occurred.
 void errorOccurredSend(java.lang.Object source, java.lang.Object timestamp, java.lang.Object data)
          Error occurred with the specified source, timestamp and data parameters.
 int getQueueSizeProblem()
          Gets the queue size problem (int) value.
 void messageReceived(TransportService transportService, java.lang.Object timestamp, MessageService message)
          This API will be called each time the TransportService receives a valid message.
 void restartTransport()
          Restart transport.
 void run()
          Perform the run action method.
 void setQueueSizeProblem(int queueSizeProblem)
          Sets the queue size problem value.
 void start()
          Start.
 void start(boolean output)
          Start the transport.
 void startProcessing(boolean output)
          Start processing with the specified output parameter.
 void stop()
          Stop.
 void stop(boolean output)
          Stop with the specified output parameter.
 void trace(java.lang.String debugMessage)
          Debug with the specified debug message parameter.
 void transportChanged(TransportService transportService, java.lang.Object timestamp, int newState, int oldState)
          This method will be called when the state of the TransportService changes.
 void transportChangedSend(TransportService source, java.lang.Object timestamp, int newState, int oldState)
          This method will be called when the state of the TransportService changes.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Field Detail

TRANSPORT_STARTED_VALUE

public static final java.lang.Integer TRANSPORT_STARTED_VALUE
Define the transport started value (Integer) constant.


TRANSPORT_STARTED_NO_OUTPUT

public static final java.lang.Integer TRANSPORT_STARTED_NO_OUTPUT
Define the transport started value no output (Integer) constant.

Constructor Detail

Controller

public Controller(Transport transport,
                  int priority)
Constructs a standard Notification object. The transport (Transport) parameter. The priority (int) parameter.

Parameters:
transport - The transport (Transport) parameter.
priority - The priority (int) parameter.
Method Detail

enqueue

public void enqueue(java.lang.Object object)
Perform the enqueue action method. java.lang.Object

Parameters:
object - The object (Object) parameter.

enqueueFirst

public void enqueueFirst(java.lang.Object object)
Perform the enqueueFirst action method. java.lang.Object

Parameters:
object - The object (Object) parameter.

enqueueRestartTransport

protected void enqueueRestartTransport()
Enqueue restart transport.


enqueueRestartTransportNoOutput

protected void enqueueRestartTransportNoOutput()
Enqueue restart transport no output.


errorOccurred

public void errorOccurred(java.lang.Object source,
                          java.lang.Object timestamp,
                          java.lang.Object data)
The errorOccurred method is called when an error has occurred. Since other notifications are blocked until this method returns, implementors of this method should: The source object that detected the error. The time at which the error was detected. Contains any data about the error.

Specified by:
errorOccurred in interface ErrorListener
Parameters:
source - The source (Object) parameter.
timestamp - The timestamp (Object) parameter.
data - The data (Object) parameter.

errorOccurredSend

public void errorOccurredSend(java.lang.Object source,
                              java.lang.Object timestamp,
                              java.lang.Object data)
Error occurred with the specified source, timestamp and data parameters. The source (Object) parameter. The timestamp (Object) parameter. The data (Object) parameter.

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

getQueueSizeProblem

public int getQueueSizeProblem()
Gets the queue size problem (int) value.

Returns:
The queue size problem (int) value.
See Also:
setQueueSizeProblem(int)

messageReceived

public void messageReceived(TransportService transportService,
                            java.lang.Object timestamp,
                            MessageService message)
This API will be called each time the TransportService receives a valid message. Since other notifications are blocked until this method returns, implementors of this method should: The transport that received the message. The timestamp when the message was detected. The message received.

Specified by:
messageReceived in interface MessageListener
Parameters:
transportService - The transport service (TransportService) parameter.
timestamp - The timestamp (Object) parameter.
message - The message (MessageService) parameter.

restartTransport

public void restartTransport()
Restart transport.

Specified by:
restartTransport in interface ControllerService
See Also:
enqueueRestartTransport()

run

public void run()
Perform the run action method.

Specified by:
run in interface java.lang.Runnable
See Also:
Runnable.run()

setQueueSizeProblem

public void setQueueSizeProblem(int queueSizeProblem)
Sets the queue size problem value. The queue size problem (int) parameter.

Parameters:
queueSizeProblem - The queue size problem (int) parameter.
See Also:
getQueueSizeProblem()

start

public void start()
Start.

Specified by:
start in interface ControllerService
See Also:
start(boolean)

start

public void start(boolean output)
Description copied from interface: ControllerService
Start the transport. if true output any errors else do not output errors.

Specified by:
start in interface ControllerService
Parameters:
output - The output (boolean) parameter.
See Also:
The output (boolean) parameter., start()

startProcessing

public void startProcessing(boolean output)
Start processing with the specified output parameter. The output (boolean) parameter.

Parameters:
output - The output (boolean) parameter.

stop

public void stop()
Stop.

Specified by:
stop in interface ControllerService
See Also:
stop(boolean)

stop

public void stop(boolean output)
Stop with the specified output parameter. The output (boolean) parameter.

Specified by:
stop in interface ControllerService
Parameters:
output - The output (boolean) parameter.
See Also:
stop()

trace

public void trace(java.lang.String debugMessage)
Debug with the specified debug message parameter. The debug message (String) parameter.

Specified by:
trace in interface ControllerService
Parameters:
debugMessage - The debug message (String) parameter.

transportChanged

public void transportChanged(TransportService transportService,
                             java.lang.Object timestamp,
                             int newState,
                             int oldState)
This method will be called when the state of the TransportService changes. Since other notifications are blocked until this method returns, implementors of this method should: Because of the multiple threads and quickly changing states, the current state of the transport may not be the same as the newState input parameter. org.eclipse.soda.dk.transport.service.TransportService java.lang.Object The new state of the TransportService when the notification process started. The old state of the TransportService.

Specified by:
transportChanged in interface TransportListener
Parameters:
transportService - The transport service (TransportService) parameter.
timestamp - The timestamp (Object) parameter.
newState - The new state (int) parameter.
oldState - The old state (int) parameter.

transportChangedSend

public void transportChangedSend(TransportService source,
                                 java.lang.Object timestamp,
                                 int newState,
                                 int oldState)
This method will be called when the state of the TransportService 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.

1.0.0

Copyright (c) 1999, 2007 IBM