Class Peer

  • All Implemented Interfaces:
    java.io.Serializable


    public class Peer
    extends java.lang.Object
    implements java.io.Serializable
    The Peer class represents a peer to which SDK sends deploy, or query proposals requests.
    See Also:
    Serialized Form
    • Method Detail

      • getName

        public java.lang.String getName​()
        Peer's name
        Returns:
        return the peer's name.
      • getProperties

        public java.util.Properties getProperties​()
      • getUrl

        public java.lang.String getUrl​()
        Get the URL of the peer.
        Returns:
        {string} Get the URL associated with the peer.
      • equals

        public boolean equals​(java.lang.Object otherPeer)
        for use in list of peers comparisons , e.g. list.contains() calls
        Overrides:
        equals in class java.lang.Object
        Parameters:
        otherPeer - the peer instance to compare against
        Returns:
        true if both peer instances have the same name and url
      • hashCode

        public int hashCode​()
        Overrides:
        hashCode in class java.lang.Object
      • finalize

        protected void finalize​()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • setPeerEventingServiceDisconnected

        public Peer.PeerEventingServiceDisconnected setPeerEventingServiceDisconnected​(Peer.PeerEventingServiceDisconnected newPeerEventingServiceDisconnectedHandler)
        Set class to handle Event hub disconnects
        Parameters:
        newPeerEventingServiceDisconnectedHandler - New handler to replace. If set to null no retry will take place.
        Returns:
        the old handler.
      • getProtocol

        public java.lang.String getProtocol​()
      • toString

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Object