@NotThreadSafe public class RLPServer extends Object implements ServiceThread.Target
Represents a process that responds to resource location requests.
Modifier and Type | Class and Description |
---|---|
static class |
RLPServer.Builder
Builder.
|
Modifier and Type | Field and Description |
---|---|
static int |
UDP_PORT
UDP port.
|
Modifier and Type | Method and Description |
---|---|
Optional<InetAddress> |
getLocalAddress()
Gets the local address.
|
int |
getLocalPort()
Gets the local port.
|
static RLPServer.Builder |
newBuilder()
Returns a new builder.
|
void |
run()
Runs.
|
void |
start()
Starts.
|
void |
stop(long joinTimeout)
Stops.
|
public static final int UDP_PORT
@Nonnull @CheckReturnValue public static RLPServer.Builder newBuilder()
@Nonnull @CheckReturnValue public Optional<InetAddress> getLocalAddress()
@CheckReturnValue public int getLocalPort()
public void run() throws Exception
Similar to same in Runnable but may throw exceptions.
run
in interface ServiceThread.Target
Exception
- Catched by the starting thread.public final void start() throws SocketException
SocketException
- On failure.public final void stop(long joinTimeout)
joinTimeout
- The join timeout.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.