HPSearch

cgl.hpsearch.common.SOAPProcessor
Class HTTPListener

java.lang.Object
  extended bycgl.hpsearch.common.SOAPProcessor.HTTPListener
All Implemented Interfaces:
Runnable

public class HTTPListener
extends Object
implements Runnable

Implements a simple HTTP Server that listens for SOAP requests and then takes actions based on the value of the <Action> element by forwarding the request to the specified processor. If a request handler is not found then a SOAPFault is thrown.
Created on Jan 28, 2005

Author:
Harshawardhan Gadgil (hgadgil@grids.ucs.indiana.edu)

Constructor Summary
HTTPListener(int p)
          Create a new Soap Service server.
 
Method Summary
 void addHandler(SOAPRequestHandler handler)
          Adds a new Service to be deployed
 String[] getDeployedListeners()
          Gets a list of deployed handlers
 String getEndpointAddress()
          The endpoint address of this listener.
 int getPort()
          The port on which this server runs
 boolean isReqRespCommunicationSocket()
           
 void run()
          Starts the HTTPServer at the specified port.
 void setReqRespCommunicationSocket(boolean reqRespCommunicationSocket)
           
 void stopServer()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPListener

public HTTPListener(int p)
Create a new Soap Service server.

Parameters:
p - Specifies the port for the service. If 0 then the first unused port is used. Use getPort() to find the port used
Method Detail

isReqRespCommunicationSocket

public final boolean isReqRespCommunicationSocket()
Returns:
Returns the reqRespCommunicationSocket.

setReqRespCommunicationSocket

public final void setReqRespCommunicationSocket(boolean reqRespCommunicationSocket)
Parameters:
reqRespCommunicationSocket - The reqRespCommunicationSocket to set.

addHandler

public void addHandler(SOAPRequestHandler handler)
Adds a new Service to be deployed

Parameters:
handler - - The JAVA object which implements the functionality. By default all public functions of this class would be allowed methods of the service.

getPort

public int getPort()
The port on which this server runs

Returns:
The port number

getEndpointAddress

public String getEndpointAddress()
The endpoint address of this listener. Typically this string would be http://host:port

Returns:
The Endpoint address

getDeployedListeners

public String[] getDeployedListeners()
Gets a list of deployed handlers

Returns:
ArrayList containing the actionURI and description of the deployed handlers

stopServer

public void stopServer()

run

public void run()
Starts the HTTPServer at the specified port.

Specified by:
run in interface Runnable

HPSearch

For comments and suggestions please send e-mail to Harshawardhan Gadgil
Last updated: June 9 2006