Class AClientReceiver

    • Field Detail

      • host

        protected final String host
      • port

        protected final int port
      • name

        protected final String name
      • token

        protected String token
      • id

        protected int id
      • connected

        protected volatile boolean connected
    • Constructor Detail

      • AClientReceiver

        public AClientReceiver​(String host,
                               int port,
                               String name)
    • Method Detail

      • registerPackHandler

        public <T extends Packet> void registerPackHandler​(Plugin plugin,
                                                           Class<T> c,
                                                           PackHandler<T> packHandler)
        Description copied from interface: ClientReceiver
        Register packet handler for server
        Specified by:
        registerPackHandler in interface ClientReceiver
        Type Parameters:
        T - the packet type
        Parameters:
        plugin - the plugin
        c - the packet class
        packHandler - the packet handler
      • getHost

        public String getHost()
        Description copied from interface: ClientReceiver
        Get the target host of the client
        Specified by:
        getHost in interface ClientReceiver
        Returns:
        the target host of the client
      • getPort

        public int getPort()
        Description copied from interface: ClientReceiver
        Get the target port of the client
        Specified by:
        getPort in interface ClientReceiver
        Returns:
        the target port of the client
      • isConnected

        public boolean isConnected()
        Description copied from interface: ClientReceiver
        Indicate this client has connected to a server
        Specified by:
        isConnected in interface ClientReceiver
        Returns:
        true if the client has connected to a server, false otherwise