public class MxIPProactiveRouting extends ProactiveRouting implements IMultiplexPlugin
Modifier and Type | Field and Description |
---|---|
static long |
CONNECT_RETRY
The retry interval in milliseconds.
|
static byte[] |
ROUTER_ADDRESS
Default router address.
|
static short |
ROUTER_PORT
Default router port.
|
static long |
TIMEOUT_CONNECT
The maximum amount of time that the plug-in will try to open a direct
connection to a remote system.
|
static long |
TIMEOUT_RECONNECT
The timeout after which the plug-in will attempt to reestablish direct
connections to a client that is known to not support direct connections
due to a previous attempt.
|
MAXIMUM_HOPS, PLUGIN_ABILITY, PROPERTY_GATEWAY, PROPERTY_NEIGHBORS, PROPERTY_SYSTEM
EXTENSION_COMPRESSION, EXTENSION_DISCOVERY, EXTENSION_ENCRYPTION, EXTENSION_ROUTING, EXTENSION_SEMANTIC, EXTENSION_SERIALIZATION, EXTENSION_TRANSCEIVER
Constructor and Description |
---|
MxIPProactiveRouting(boolean retransmit)
Creates a new gateway that binds at any local address and that uses the
default router configuration.
|
MxIPProactiveRouting(boolean retransmit,
byte[] routerAddress,
short routerPort)
Creates a new gateway that uses the specified router configuration.
|
MxIPProactiveRouting(boolean retransmit,
java.lang.String fileName)
Creates a new gateway that uses the router configuration specified in a
configuration file.
|
Modifier and Type | Method and Description |
---|---|
void |
acceptConnector(MultiplexFactory source,
IStreamConnector connector)
Called whenever the router is used to connect to the gateway plugin.
|
void |
closeMultiplexer(MultiplexFactory multiplexer)
Called whenever the multiplexer is closed.
|
void |
deliverIncoming(IStreamConnector connector,
ISession session)
Called when a remote device connects through a local plugin.
|
IPluginManager |
getPluginManager()
Returns the plug-in manager.
|
IStreamConnector |
openSession(ISession session)
Called to open a connection using the specified session.
|
void |
start()
Called to start the plug-in.
|
void |
stop()
Called to stop the plug-in.
|
getPluginDescription, handleEvent, perform, prepareSession, setFilter, setRoutingManager
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getPluginDescription
public static final byte[] ROUTER_ADDRESS
public static final short ROUTER_PORT
public static final long CONNECT_RETRY
public static final long TIMEOUT_CONNECT
public static final long TIMEOUT_RECONNECT
public MxIPProactiveRouting(boolean retransmit)
retransmit
- Determines whether packets are retransmitted over the
same plug-in.public MxIPProactiveRouting(boolean retransmit, byte[] routerAddress, short routerPort)
retransmit
- Determines whether packets are retransmitted over the
same plug-in.routerAddress
- The ip address of the router.routerPort
- The port number of the router.public MxIPProactiveRouting(boolean retransmit, java.lang.String fileName)
retransmit
- Determines whether packets are retransmitted over the
same plug-in.fileName
- Name of the configuration file.public IStreamConnector openSession(ISession session) throws java.io.IOException
openSession
in interface IStreamer
openSession
in class ProactiveRouting
session
- The session that defines the target.java.io.IOException
- Thrown if the connection cannot be established.public void deliverIncoming(IStreamConnector connector, ISession session)
deliverIncoming
in interface IDispatcher
deliverIncoming
in class ProactiveRouting
connector
- The connector that is bound to the incomming
communication.session
- The session object for the communication.public void acceptConnector(MultiplexFactory source, IStreamConnector connector)
acceptConnector
in interface IMultiplexPlugin
source
- The source factory which is simply the factory connecting
to the router.connector
- The connector created by the factory.public void closeMultiplexer(MultiplexFactory multiplexer)
closeMultiplexer
in interface IMultiplexPlugin
multiplexer
- The multiplexer that has been closed.public void start()
start
in interface IPlugin
start
in class ProactiveRouting
public void stop()
stop
in interface IPlugin
stop
in class ProactiveRouting
public IPluginManager getPluginManager()
getPluginManager
in interface IMultiplexPlugin