guarana.toolkit.task.communicators
Class InCommunicator
java.lang.Object
guarana.util.observer.smart.SmartObservable
guarana.framework.task.Task
guarana.toolkit.task.communicators.Communicator
guarana.toolkit.task.communicators.InCommunicator
- All Implemented Interfaces:
- ISource, IStubIn, guarana.util.observer.smart.ISmartObserver, Remote
public class InCommunicator
- extends Communicator
- implements IStubIn
A communicator to receive messages in EntryPort
s.
It provides passive and active interfaces.
Graphical notation:
- Since:
- Guaranį SDK 1.0.0
- Author:
- Rafael Z. Frantz
Method Summary |
void |
execute()
This method executes the business logic of this task. |
void |
pushRead(Message<?> message)
This method can be invoked to push a message into an EntryPort via an In-Communicator task. |
Methods inherited from class guarana.util.observer.smart.SmartObservable |
addSmartObserver, containsSmartObserver, containsSmartObserver, countSmartObservers, deleteSmartObserver, deleteSmartObservers, hasChanged, notifySmartObservers, notifySmartObservers |
InCommunicator
public InCommunicator(String name,
String host,
int port)
- Constructs a new Passive Communicator to receive messages and exports this communicator to the RMI Registry.
- Parameters:
name
- The name of the communicator.host
- The host name on which the registry is running.port
- The port on which the registry accepts requests.
InCommunicator
public InCommunicator(String name,
IEntryAdapter adapter)
- Constructs a new Active Communicator to receive message. The default trigger interval is 5000ms.
- Parameters:
name
- The name of the communicator.adapter
- The adapter used by the communicator.
execute
public void execute()
throws TaskExecutionException
- This method executes the business logic of this task. It is automatically invoked by workers.
- Overrides:
execute
in class Task
- Throws:
TaskExecutionException
- to report any exception that has occurred during the execution of this method.- See Also:
TaskExecutionException
pushRead
public void pushRead(Message<?> message)
throws RemoteException
- This method can be invoked to push a message into an
EntryPort
via an In-Communicator task.
- Specified by:
pushRead
in interface IStubIn
- Parameters:
message
- The inbound message.
- Throws:
RemoteException
- if any remote exception is raised during this method execution.- See Also:
communicator.proxy.IStubIn
Guaranį DSL Home