Class Connection

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class Connection
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Constructor Summary

      Constructors 
      Constructor Description
      Connection​(java.net.Socket socket, java.io.BufferedReader in, java.io.BufferedWriter out)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void call​(java.lang.String cmd)  
      void close()  
      java.lang.Iterable<Device> devices()  
      Poll poll()  
      <T> T recieve​(java.lang.Class<T> clazz)  
      Version version()  
      net.anwiba.commons.lang.object.ObjectPair<Devices,​Watch> watch​(boolean enable, java.lang.String deviceName)  
      • Methods inherited from class java.lang.Object

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

      • Connection

        public Connection​(java.net.Socket socket,
                          java.io.BufferedReader in,
                          java.io.BufferedWriter out)
    • Method Detail

      • watch

        public net.anwiba.commons.lang.object.ObjectPair<Devices,​Watch> watch​(boolean enable,
                                                                                    java.lang.String deviceName)
                                                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • devices

        public java.lang.Iterable<Device> devices()
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • version

        public Version version()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • poll

        public Poll poll()
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • recieve

        public <T> T recieve​(java.lang.Class<T> clazz)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • call

        public void call​(java.lang.String cmd)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.io.IOException