Class HttpSocket


  • public class HttpSocket
    extends java.lang.Object
    This class is used as the bag of information kept about a open, idle socket. It is not meant to be used externally by anyone except someone writing a new implementation of an HttpSocketPool for the HttpRequest object.

    This class should not be visible at this scope. It is only here until a better place for it is found.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      boolean firstTime  
      java.lang.String host  
      java.io.InputStream in  
      long lastUsed  
      java.io.OutputStream out  
      int port  
      java.net.Socket sock  
      int timesUsed  
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpSocket​(java.lang.String host, int port)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • host

        public java.lang.String host
      • port

        public int port
      • firstTime

        public boolean firstTime
      • lastUsed

        public long lastUsed
      • timesUsed

        public int timesUsed
      • sock

        public java.net.Socket sock
      • in

        public java.io.InputStream in
      • out

        public java.io.OutputStream out
    • Constructor Detail

      • HttpSocket

        public HttpSocket​(java.lang.String host,
                          int port)
                   throws java.io.IOException,
                          java.net.UnknownHostException
        Throws:
        java.io.IOException
        java.net.UnknownHostException
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object