Package org.openmuc.jdlms
Class DlmsServer.TcpServerBuilder
- java.lang.Object
-
- org.openmuc.jdlms.ServerBuilder<DlmsServer.TcpServerBuilder>
-
- org.openmuc.jdlms.DlmsServer.TcpServerBuilder
-
- Enclosing class:
- DlmsServer
public static class DlmsServer.TcpServerBuilder extends ServerBuilder<DlmsServer.TcpServerBuilder>
Builder to create a TCP physical device/server.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openmuc.jdlms.ServerBuilder
ServerBuilder.ServerSettingsImpl
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DlmsServer
build()
Builds a new server and starts it, with the provided settings.DlmsServer.TcpServerBuilder
setSessionLayerFactory(ServerSessionLayerFactory sessionLayerFactory)
Set the server session layer factory.DlmsServer.TcpServerBuilder
setTcpPort(int port)
The port a client may access the server.-
Methods inherited from class org.openmuc.jdlms.ServerBuilder
newServer, parseLogicalDevices, registerLogicalDevice, registerLogicalDevice, setConnectionListener, setInactivityTimeout, setMaxClients, setPropertiesTo, setReferencingMethod, setResponseTimeout
-
-
-
-
Method Detail
-
setSessionLayerFactory
public DlmsServer.TcpServerBuilder setSessionLayerFactory(ServerSessionLayerFactory sessionLayerFactory)
Set the server session layer factory.- Parameters:
sessionLayerFactory
- the session layer factory.- Returns:
- the current builder instance.
- See Also:
ServerSessionLayerFactories.newWrapperSessionLayerFactory()
,ServerSessionLayerFactories.newHdlcSessionLayerFactory()
-
setTcpPort
public DlmsServer.TcpServerBuilder setTcpPort(int port)
The port a client may access the server.- Parameters:
port
- the TCP port the server starts listening on.- Returns:
- the current builder instance.
-
build
public DlmsServer build() throws java.io.IOException
Description copied from class:ServerBuilder
Builds a new server and starts it, with the provided settings.- Specified by:
build
in classServerBuilder<DlmsServer.TcpServerBuilder>
- Returns:
- the new Server.
- Throws:
java.io.IOException
- if an I/O exception occurs while starting the server.
-
-