Class Net


  • public class Net
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.web3j.protocol.Web3jService web3jService  
    • Constructor Summary

      Constructors 
      Constructor Description
      Net​(org.web3j.protocol.Web3jService web3jService)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.web3j.protocol.core.Request<?,​Bytes> getNetworkID()
      Returns the network identifier (network ID).
      org.web3j.protocol.core.Request<?,​Quantity> getPeerCount()
      Returns the number of peers currently connected to the client.
      org.web3j.protocol.core.Request<?,​KlayPeerCount> getPeerCountByType()
      Returns the number of connected nodes by type and the total number of connected nodes.
      org.web3j.protocol.core.Request<?,​Quantity> getVersion()
      Returns the current klaytn protocol version.
      org.web3j.protocol.core.Request<?,​Boolean> isListening()
      Returns true if the client is actively listening for network connections.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • web3jService

        protected final org.web3j.protocol.Web3jService web3jService
    • Constructor Detail

      • Net

        public Net​(org.web3j.protocol.Web3jService web3jService)
    • Method Detail

      • getNetworkID

        public org.web3j.protocol.core.Request<?,​Bytes> getNetworkID()
        Returns the network identifier (network ID).
        Returns:
        Bytes - The integer of the network identifier.
      • isListening

        public org.web3j.protocol.core.Request<?,​Boolean> isListening()
        Returns true if the client is actively listening for network connections.
        Returns:
        Boolean - true when listening, otherwise false
      • getPeerCount

        public org.web3j.protocol.core.Request<?,​Quantity> getPeerCount()
        Returns the number of peers currently connected to the client.
        Returns:
        Quantity - Integer of the number of connected peers.
      • getPeerCountByType

        public org.web3j.protocol.core.Request<?,​KlayPeerCount> getPeerCountByType()
        Returns the number of connected nodes by type and the total number of connected nodes.
        Returns:
        KlayPeerCount - The number of connected peers by type as well as the total number of connected peers.
      • getVersion

        public org.web3j.protocol.core.Request<?,​Quantity> getVersion()
        Returns the current klaytn protocol version.
        Returns:
        Quantity - Integer of the current klaytn protocol version.