Class HttpServerConnection

java.lang.Object
org.sblim.cimclient.internal.http.HttpServerConnection
All Implemented Interfaces:
Runnable

public class HttpServerConnection extends Object implements Runnable
Class HttpServerConnection implements the outer shell of a HTTP server. It accepts incoming connections and puts them in a queue to be serviced by an independent thread
  • Constructor Details

    • HttpServerConnection

      public HttpServerConnection(HttpConnectionHandler pHandler, String pLocalAddress, int pPort, boolean pSsl, WBEMConfiguration pProperties) throws IOException
      Ctor.
      Parameters:
      pHandler - The connection handler
      pLocalAddress - The local address to bind the port to. If null the port is bound to all local addresses. For use on multi-homed systems
      pPort - The local port. If zero any free port will be chosen.
      pSsl - SSL secured connection ?
      pProperties - The configuration context
      Throws:
      IOException
  • Method Details

    • setName

      public void setName(String pName)
      Set the name of the thread
      Parameters:
      pName - The new value
    • getPort

      public int getPort()
      Returns the port
      Returns:
      The port
    • getLocalIp

      public String getLocalIp() throws UnknownHostException
      Returns the local ip address the socket is bound to
      Returns:
      The ip address
      Throws:
      UnknownHostException
    • getLocalHostName

      public String getLocalHostName() throws UnknownHostException
      Returns the local hostname the socket is bound to
      Returns:
      The host name
      Throws:
      UnknownHostException
    • isSSL

      public boolean isSSL()
      Return whether this connection is SSL secured
      Returns:
      true if SSL is enabled, false otherwise
    • start

      public void start()
      Starts a thread that waits for incoming connections
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • close

      public void close()
      Closes the socket and shuts down the listening threads