public class CARepeater
extends java.lang.Object
implements java.lang.Runnable
| Modifier and Type | Class and Description |
|---|---|
static class |
CARepeater.JNIRepeater |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CA_DISABLE_REPEATER
System JVM property key to disable CA repeater.
|
static java.lang.String |
CA_FORCE_NATIVE_REPEATER
System JVM property key to force native repeater.
|
protected java.util.List<org.epics.ca.impl.repeater.CARepeater.Client> |
clients
List of registered clients.
|
protected java.net.DatagramSocket |
localDatagramSocket
Local unbounded DatagramSocket.
|
protected int |
repeaterPort
Repeater port.
|
| Constructor and Description |
|---|
CARepeater()
Constructor.
|
CARepeater(int repeaterPort)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected static java.net.DatagramSocket |
createDatagramSocket()
Constructs an unbound datagram socket.
|
protected static java.net.DatagramSocket |
createDatagramSocket(int port,
boolean reuseAddress)
Constructs a atagram socket bound to the wildcard address on defined port.
|
protected void |
fanOut(java.net.InetSocketAddress fromAddress,
java.nio.ByteBuffer buffer) |
protected static boolean |
isRepeaterRunning(int repeaterPort)
Check if repeater is running.
|
static void |
main(java.lang.String[] argv)
Main entry-point.
|
protected void |
process()
Process UDP requests.
|
protected void |
registerNewClient(java.net.InetSocketAddress clientAddress) |
void |
run() |
static void |
startRepeater(int repeaterPort)
Start repeater as detached process.
|
protected void |
verifyClients()
Verify all the clients.
|
public static final java.lang.String CA_FORCE_NATIVE_REPEATER
public static final java.lang.String CA_DISABLE_REPEATER
protected int repeaterPort
protected java.net.DatagramSocket localDatagramSocket
protected java.util.List<org.epics.ca.impl.repeater.CARepeater.Client> clients
public CARepeater()
public CARepeater(int repeaterPort)
repeaterPort - repeater port.public void run()
run in interface java.lang.RunnableRunnable.run()protected void registerNewClient(java.net.InetSocketAddress clientAddress)
protected void fanOut(java.net.InetSocketAddress fromAddress,
java.nio.ByteBuffer buffer)
protected void verifyClients()
protected void process()
protected static java.net.DatagramSocket createDatagramSocket()
throws java.net.SocketException
java.net.SocketException - socket exceptionprotected static java.net.DatagramSocket createDatagramSocket(int port,
boolean reuseAddress)
throws java.net.SocketException
port - portreuseAddress - reuse addressjava.net.SocketException - socket exceptionprotected static boolean isRepeaterRunning(int repeaterPort)
repeaterPort - repeater port.true if repeater is already running, false otherwisepublic static void startRepeater(int repeaterPort)
throws java.lang.Throwable
repeaterPort - repeater port.java.lang.Throwable - throwablepublic static void main(java.lang.String[] argv)
argv - arguments.