Class DaemonClient


  • public class DaemonClient
    extends java.lang.Object
    Active network client of Daemon.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Daemon daemon  
      private java.net.InetAddress peer  
      private java.io.InputStream rawIn  
      private java.io.OutputStream rawOut  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void execute​(java.net.Socket sock)  
      Daemon getDaemon()
      Get the daemon which spawned this client.
      java.io.InputStream getInputStream()
      Get input stream to read from the connected client.
      java.io.OutputStream getOutputStream()
      Get output stream to send data to the connected client.
      java.net.InetAddress getRemoteAddress()
      Get Internet address of the remote client.
      (package private) void setRemoteAddress​(java.net.InetAddress ia)  
      • Methods inherited from class java.lang.Object

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

      • daemon

        private final Daemon daemon
      • peer

        private java.net.InetAddress peer
      • rawIn

        private java.io.InputStream rawIn
      • rawOut

        private java.io.OutputStream rawOut
    • Constructor Detail

      • DaemonClient

        DaemonClient​(Daemon d)
    • Method Detail

      • setRemoteAddress

        void setRemoteAddress​(java.net.InetAddress ia)
      • getDaemon

        public Daemon getDaemon()
        Get the daemon which spawned this client.
        Returns:
        the daemon which spawned this client.
      • getRemoteAddress

        public java.net.InetAddress getRemoteAddress()
        Get Internet address of the remote client.
        Returns:
        Internet address of the remote client.
      • getInputStream

        public java.io.InputStream getInputStream()
        Get input stream to read from the connected client.
        Returns:
        input stream to read from the connected client.
      • getOutputStream

        public java.io.OutputStream getOutputStream()
        Get output stream to send data to the connected client.
        Returns:
        output stream to send data to the connected client.