Package org.openmuc.j60870
Class Server
- java.lang.Object
-
- org.openmuc.j60870.Server
-
public class Server extends java.lang.ObjectThe server is used to start listening for IEC 60870-5-104 client connections.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServer.BuilderThe 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.Builderbuilder()booleanisStopped()voidstart(ServerEventListener listener)Starts a new thread that listens on the configured port.voidstop()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.
-
-