Class AbstractNetworkManager

    • Field Detail

      • localPeerID

        protected PeerID localPeerID
        Represents local PeerID. This value should be assigned in real NetworkManager's implementation correspoinding to the specific transport layer
    • Constructor Detail

      • AbstractNetworkManager

        public AbstractNetworkManager()
    • Method Detail

      • stop

        public void stop()
                  throws java.io.IOException
        Stops this network manager For cleaning up remaining values and finishing I/O operation, this method could be used
        Specified by:
        stop in interface NetworkManager
        Specified by:
        stop in interface ShoalMessageSender
        Throws:
        java.io.IOException - if an I/O error occurs
      • receiveMessage

        public void receiveMessage​(Message message,
                                   java.util.Map piggyback)
        Processes a received Message In this process, inbound Message will be wrapped into MessageEvent and be delivered to registered MessageListener with corresponding to the message type
        Specified by:
        receiveMessage in interface NetworkManager
        Parameters:
        message - inbound message
        piggyback - piggyback
      • getInstance

        public static NetworkManager getInstance​(java.lang.String transport)
      • getLogger

        public static java.util.logging.Logger getLogger()
      • initialize

        public void initialize​(java.lang.String groupName,
                               java.lang.String instanceName,
                               java.util.Map properties)
                        throws java.io.IOException
        Description copied from interface: NetworkManager
        Initializes this network manager with given params and properties
        Specified by:
        initialize in interface NetworkManager
        Parameters:
        groupName - group name
        instanceName - instance name
        properties - specific properties
        Throws:
        java.io.IOException - if an unexpected error occurs