Package org.openmuc.jeebus.ship.node
Class ShipNodeImpl
- java.lang.Object
-
- org.openmuc.jeebus.ship.node.ShipNodeImpl
-
public class ShipNodeImpl extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Loggerlog
-
Constructor Summary
Constructors Constructor Description ShipNodeImpl(ShipNodeConfiguration nodeConfig, ConnectionHandler connHandler)sets up a SHIP node
-
Method Summary
-
-
-
Constructor Detail
-
ShipNodeImpl
public ShipNodeImpl(ShipNodeConfiguration nodeConfig, ConnectionHandler connHandler)
sets up a SHIP node- Parameters:
nodeConfig- SHIP node configuration parametersconnHandler- connection handler to handle all interactions with SHIP peer
-
-
Method Detail
-
closeDoubleConns
public void closeDoubleConns(WebSocketHandler current)
-
createClient
public ShipClient createClient(java.net.URI serverUri)
-
createServer
public ShipServer createServer(int port, java.lang.String wssPath, boolean keepAlive)
-
autoAcceptMode
public void autoAcceptMode()
activates auto accept mode
-
consumeAutoAccept
public boolean consumeAutoAccept()
synchronized method to check if auto accept mode is running. Cancels the timeout if it is and sets auto accept to false.- Returns:
trueif SHIP node was in auto accept mode, else returnsfalse
-
stopAllServers
public void stopAllServers()
-
stopAllClients
public void stopAllClients()
-
getServiceRegistry
public ServiceRegistry getServiceRegistry()
-
setServiceRegistry
public void setServiceRegistry(ServiceRegistry serviceRegistry)
-
getServers
public java.util.List<ShipServer> getServers()
-
setServers
public void setServers(java.util.List<ShipServer> servers)
-
getClients
public java.util.List<ShipClient> getClients()
-
setClient
public void setClient(java.util.List<ShipClient> clients)
-
addClient
public void addClient(ShipClient client)
-
getKeyManagement
public KeyManagement getKeyManagement()
-
setKeyManagement
public void setKeyManagement(KeyManagement keyManagement)
-
getConfig
public Configuration getConfig()
-
getConnHandler
public ConnectionHandler getConnHandler()
-
setConnHandler
public void setConnHandler(ConnectionHandler connHandler)
-
getClientConnectedListener
public ClientConnectedCallBack getClientConnectedListener()
-
setClientConnectedListener
public void setClientConnectedListener(ClientConnectedCallBack listener)
-
isAutoAccept
public boolean isAutoAccept()
-
removeClient
public void removeClient(ShipClient client)
-
removeServer
public void removeServer(ShipServer server)
-
isDoubleConnection
public boolean isDoubleConnection(java.lang.String peerSki)
-
getOwnSki
public java.lang.String getOwnSki()
-
-