Class Admin


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

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

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.web3j.protocol.core.Request<?,​Boolean> addPeer​(java.lang.String kni)
      Adds the new remote node from given kni.
      org.web3j.protocol.core.Request<?,​Bytes> getDataDir()
      Returns the running Klaytn node's data directory.
      org.web3j.protocol.core.Request<?,​NodeInfo> getNodeInfo()
      Returns the node information.
      org.web3j.protocol.core.Request<?,​Peers> getPeers()
      Returns the peer info of the connected remote nodes.
      org.web3j.protocol.core.Request<?,​Boolean> removePeer​(java.lang.String kni)
      Removes the remote node from given kni.
      • 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

      • Admin

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

      • getNodeInfo

        public org.web3j.protocol.core.Request<?,​NodeInfo> getNodeInfo()
        Returns the node information.
        Returns:
        NodeInfo - The node info of the running Klaytn node.
      • getDataDir

        public org.web3j.protocol.core.Request<?,​Bytes> getDataDir()
        Returns the running Klaytn node's data directory.
        Returns:
        Bytes - The absolute path of the klaytn node.
      • getPeers

        public org.web3j.protocol.core.Request<?,​Peers> getPeers()
        Returns the peer info of the connected remote nodes.
        Returns:
        Peers - peer info of the connected nodes.
      • addPeer

        public org.web3j.protocol.core.Request<?,​Boolean> addPeer​(java.lang.String kni)
        Adds the new remote node from given kni.
        Parameters:
        kni - The remote node kni value.
        Returns:
        Boolean - true if the peer was accepted, otherwise false.
      • removePeer

        public org.web3j.protocol.core.Request<?,​Boolean> removePeer​(java.lang.String kni)
        Removes the remote node from given kni.
        Parameters:
        kni - The remote node kni value.
        Returns:
        Boolean - true if success, otherwise false.