Class DummyTransportTrx
java.lang.Object
net.messagevortex.AbstractDaemon
net.messagevortex.transport.dummy.DummyTransportTrx
- All Implemented Interfaces:
RunningDaemon,Transport,TransportSender
-
Constructor Summary
ConstructorsConstructorDescriptionDummyTransportTrx(String section) Constructor to set up a dummy endpoint with named id and blender.DummyTransportTrx(String id, TransportReceiver blender) Constructor to set up a dummy endpoint with named id and blender.DummyTransportTrx(TransportReceiver blender) Constructor to create an endpoint with a random id. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidRemove all Dummy endpoints from the main listing.voidsendMessage(String address, InputStream is) send a message to another dummy endpoint.static voidsetClusterName(String newName) Sets the name of the cluster instance.static booleansetLocalMode(boolean lm) Set local only mode for dummy transport.voidShuts this class down.Methods inherited from class net.messagevortex.AbstractDaemon
startDaemon, stopDaemonMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.messagevortex.RunningDaemon
startDaemon, stopDaemon
-
Constructor Details
-
DummyTransportTrx
Constructor to set up a dummy endpoint with named id and blender.
- Parameters:
section- section containing data to set up endpoint- Throws:
IOException- if endpoint id is already defined
-
DummyTransportTrx
Constructor to set up a dummy endpoint with named id and blender.
- Parameters:
id- ID of the endpointblender- blender to be used for received messages- Throws:
IOException- if endpoint id is already defined
-
DummyTransportTrx
Constructor to create an endpoint with a random id.- Parameters:
blender- reference to the respective blender layer- Throws:
IOException- if thread problems occur
-
-
Method Details
-
setClusterName
Sets the name of the cluster instance.
- Parameters:
newName- the new Name of the instance to connect to.- Throws:
IOException- if the cluster is already initialized
-
setLocalMode
Set local only mode for dummy transport.
- Parameters:
lm- true if local mode should be set- Returns:
- old state of local mode
- Throws:
IOException- if cluster is already initialized
-
shutdownDaemon
public void shutdownDaemon()Description copied from interface:RunningDaemonShuts this class down.
This frees all resources and ends all threads for an application or layer shutdown. It is not possible to call start() after running shutdown().
- Specified by:
shutdownDaemonin interfaceRunningDaemon- Overrides:
shutdownDaemonin classAbstractDaemon
-
sendMessage
send a message to another dummy endpoint.
FIXME: This only works for local messages
- Specified by:
sendMessagein interfaceTransportSender- Parameters:
address- the string representation of the target address on the transport layeris- the input stream to be sent- Throws:
IOException- if requested endpoint id is unknown
-
clearDummyEndpoints
public static void clearDummyEndpoints()Remove all Dummy endpoints from the main listing.
-