public abstract class InterProcessCommFactory
extends java.lang.Object
InterProcessCommFactorySocket
. For example:
new InterProcessCommFactorySocket(); //creates a singleton.This instance can be used with the following pattern:
InterProcessCommFactory.singeton().create("UDP:127.0.0.1:60100");This example creates an InterProcessComm instance which uses an Socket-UDP-Protocoll on port 60100 on local host (loop back).
InterProcessCommFactory ipcFactory = new InterProcessCommFactorySocket(); //creates a singleton. ..... ipcFactory.create("UDP:127.0.0.1:60105");
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
sVersion
Version, history and license.
|
private static InterProcessCommFactory |
theSingleton |
Modifier | Constructor and Description |
---|---|
protected |
InterProcessCommFactory()
Sets
theSingleton if not set yet. returns always a new instance. |
Modifier and Type | Method and Description |
---|---|
abstract InterProcessComm |
create(Address_InterProcessComm addr)
Creates an instance of the InterProcessComm for the given communication implementation.
|
abstract InterProcessComm |
create(java.lang.String protocolAndOwnAddr)
Creates an instance of the InterProcessComm for the given communication implementation.
|
abstract InterProcessComm |
create(java.lang.String protocolAndOwnAddr,
int nPort)
Creates a InterProcessComm from a parameter String.
|
abstract Address_InterProcessComm |
createAddress(java.lang.String protocolAndOwnAddr)
Creates an address for a specific communication channel.
|
abstract Address_InterProcessComm |
createAddress(java.lang.String protocolAndOwnAddr,
int nPort)
Creates an address for a specific communication channel.
|
static InterProcessCommFactory |
getInstance()
Gets the instance of the
InterProcessCommFactory for this application. |
public static final java.lang.String sVersion
private static InterProcessCommFactory theSingleton
protected InterProcessCommFactory()
theSingleton
if not set yet. returns always a new instance.public static InterProcessCommFactory getInstance()
InterProcessCommFactory
for this application.public abstract Address_InterProcessComm createAddress(java.lang.String protocolAndOwnAddr, int nPort)
create(Address_InterProcessComm)
.protocolAndOwnAddr
- String determines the channel. For example "UDP:0.0.0.0" to create a socket communication.nPort
- Numeric value for the fine definition. Port number for Socket.public abstract Address_InterProcessComm createAddress(java.lang.String protocolAndOwnAddr)
create(Address_InterProcessComm)
.protocolAndOwnAddr
- String determines the channel. For example "UDP:0.0.0.0:6000" to create a socket communication.public abstract InterProcessComm create(java.lang.String protocolAndOwnAddr, int nPort)
protocolAndOwnAddr
- A string which determines the kind of communication and the own address (slot).
It depends on the underlying system which kind of communication are supportedpublic abstract InterProcessComm create(java.lang.String protocolAndOwnAddr)
protocolAndOwnAddr
- It determines the communication channel. Use "UDP:0.0.0.0:6000" for example
to create an UDP-Socket communication which uses the port 6000 on all existing network adapters.public abstract InterProcessComm create(Address_InterProcessComm addr)
addr
- The own address, see createAddress(String)
and createAddress(String, int)
.