org.sblim.wbem.http

Class HttpServerConnection

Implemented Interfaces:
Runnable

public class HttpServerConnection
extends java.lang.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 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
String
getHostIP()
Returns the host ip
int
getPort()
Returns the port
boolean
isSSL()
Returns if SSL is enanbled
void
run()
void
setName(String name)
Set the name of the thread
void
start()
Starts the server thread

Constructor Details

HttpServerConnection

public HttpServerConnection(HttpConnectionHandler handler,
                            int port)
            throws IOException

HttpServerConnection

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

HttpServerConnection

public HttpServerConnection(HttpConnectionHandler handler,
                            int port,
                            boolean ssl,
                            SessionProperties properties)
            throws 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

Method Details

close

public void close()
Shuts down the server

getHostIP

public String getHostIP()
            throws UnknownHostException
Returns the host ip
Returns:
The host ip

getPort

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

isSSL

public boolean isSSL()
Returns if SSL is enanbled
Returns:
true if SSL is enabled

run

public void run()

setName

public void setName(String name)
Set the name of the thread
Parameters:
name - The name

start

public void start()
Starts the server thread

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