Package org.openmuc.j60870
Class Server
- java.lang.Object
-
- org.openmuc.j60870.Server
-
public class Server extends java.lang.Object
The server is used to start listening for IEC 60870-5-104 client connections.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Server.Builder
The server builder which builds a 60870 server instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Server.Builder
builder()
boolean
isStopped()
void
start(ServerEventListener listener)
Starts a new thread that listens on the configured port.void
stop()
Stop listening for new connections.
-
-
-
Method Detail
-
isStopped
public boolean isStopped()
-
builder
public static Server.Builder builder()
-
start
public void start(ServerEventListener listener) throws java.io.IOException
Starts a new thread that listens on the configured port. This method is non-blocking.- Parameters:
listener
- the ServerConnectionListener that will be notified when remote clients are connecting or the server stopped listening.- Throws:
java.io.IOException
- if any kind of error occurs while creating the server socket.
-
stop
public void stop()
Stop listening for new connections. Existing connections are not touched.
-
-