org.sblim.wbem.http
Class HttpServerConnection

java.lang.Object
  extended byorg.sblim.wbem.http.HttpServerConnection
All Implemented Interfaces:
java.lang.Runnable

public class HttpServerConnection
extends java.lang.Object
implements java.lang.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 Summary
HttpServerConnection(HttpConnectionHandler handler, int port)
           
HttpServerConnection(HttpConnectionHandler handler, int port, boolean ssl)
           
HttpServerConnection(HttpConnectionHandler handler, int port, boolean ssl, SessionProperties properties)
          Ctor.
 
Method Summary
 void close()
          Shuts down the server
 java.lang.String getHostIP()
          Returns the host ip
 int getPort()
          Returns the port
 boolean isSSL()
          Returns if SSL is enanbled
 void run()
           
 void setName(java.lang.String name)
          Set the name of the thread
 void start()
          Starts the server thread
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpServerConnection

public HttpServerConnection(HttpConnectionHandler handler,
                            int port,
                            boolean ssl,
                            SessionProperties properties)
                     throws java.io.IOException
Ctor.

Parameters:
handler - The handler for incoming connections
port - The port to listen on
ssl - If true SSL is enabled
properties - The configuration to use
Throws:
java.io.IOException - On failure to create the server socket

HttpServerConnection

public HttpServerConnection(HttpConnectionHandler handler,
                            int port,
                            boolean ssl)
                     throws java.io.IOException

HttpServerConnection

public HttpServerConnection(HttpConnectionHandler handler,
                            int port)
                     throws java.io.IOException
Method Detail

setName

public void setName(java.lang.String name)
Set the name of the thread

Parameters:
name - The name

getPort

public int getPort()
Returns the port

Returns:
The port

getHostIP

public java.lang.String getHostIP()
                           throws java.net.UnknownHostException
Returns the host ip

Returns:
The host ip
Throws:
java.net.UnknownHostException

isSSL

public boolean isSSL()
Returns if SSL is enanbled

Returns:
true if SSL is enabled

start

public void start()
Starts the server thread


run

public void run()
Specified by:
run in interface java.lang.Runnable

close

public void close()
Shuts down the server



Copyright © 2005, 2010 IBM Corporation. All Rights Reserved.