org.sblim.cimclient.internal.http

Class HttpServerConnection

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 Summary
HttpServerConnection(HttpConnectionHandler pHandler, String pLocalAddress, int pPort, boolean pSsl, WBEMConfiguration pProperties)
Ctor.
Method Summary
voidclose()
Closes the socket and shuts down the listening threads
StringgetLocalHostName()
Returns the local hostname the socket is bound to
StringgetLocalIp()
Returns the local ip address the socker is bound to
intgetPort()
Returns the port
booleanisSSL()
Return wether this connection is SSL secured
voidrun()
voidsetName(String pName)
Set the name of the thread
voidstart()
Starts a thread that waits for incoming connections

Constructor Detail

HttpServerConnection

public HttpServerConnection(HttpConnectionHandler pHandler, String pLocalAddress, int pPort, boolean pSsl, WBEMConfiguration pProperties)
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 Detail

close

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

getLocalHostName

public String getLocalHostName()
Returns the local hostname the socket is bound to

Returns: The host name

Throws: UnknownHostException

getLocalIp

public String getLocalIp()
Returns the local ip address the socker is bound to

Returns: The ip address

Throws: UnknownHostException

getPort

public int getPort()
Returns the port

Returns: The port

isSSL

public boolean isSSL()
Return wether this connection is SSL secured

Returns: true if SSL is enabled, false otherwise

run

public void run()

setName

public void setName(String pName)
Set the name of the thread

Parameters: pName The new value

start

public void start()
Starts a thread that waits for incoming connections
Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.