public class Repeater extends Object
Channel Access repeater.
The repeater listens on a UDP socket, waiting for registration requests from clients and CA_PROTO_RSRV_IS_UP messages from servers. These messages are relayed to the registered clients. This is needed because on some systems only one UDP socket can be bound to the same port and on most other systems, only broadcasts are sent to multiple UDP sockets while unicasts are only sent to a single socket.
The repeater runs within the Java VM and thus is stopped when the VM is
shutdown. Therefore, starting an external repeater (the
caRepeater
executable from the EPICS distribution) should always
be preferred over using this repeater. This repeater is only provided as a
last resort if no caRepeater
executable can be found.
Constructor and Description |
---|
Repeater(ErrorHandler errorHandler,
int repeaterPort)
Creates a repeater on the specified port, using the specified error
handler.
|
Modifier and Type | Method and Description |
---|---|
void |
start()
Starts the repeater.
|
void |
stop()
Stops the repeater.
|
public Repeater(ErrorHandler errorHandler, int repeaterPort)
start()
method is called.errorHandler
- error handler used for logging errors (never null
). The error handler must never throw exceptions. This can be
ensured by wrapping it in a ExceptionSafeErrorHandler
.repeaterPort
- UDP port the repeater binds to. This must be a port number
between 1 and 65535.IllegalArgumentException
- if the repeaterPort
is not a valid UDP port
number.public void start()
public void stop()
Copyright © 2014–2016 aquenos GmbH. All rights reserved.