Class ShipNode


  • public class ShipNode
    extends java.lang.Object
    • Field Detail

      • log

        protected static final org.slf4j.Logger log
    • Constructor Detail

      • ShipNode

        public ShipNode​(ShipNodeConfiguration nodeConfig,
                        ConnectionHandler connHandler)
        sets up a SHIP node
        Parameters:
        nodeConfig - SHIP node configuration parameters
        connHandler - connection handler to handle all interactions with SHIP peer
    • Method Detail

      • 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:
        true if SHIP node was in auto accept mode, else returns false
      • stopAllServers

        public void stopAllServers()
      • stopAllClients

        public void stopAllClients()
      • setServiceReg

        public void setServiceReg​(ServiceRegistry serviceReg)
      • 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)
      • isAutoAccept

        public boolean isAutoAccept()