deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.ogcwebservices.wass.wss.operation
Class DoServiceHandler

java.lang.Object
  extended by org.deegree.ogcwebservices.wass.wss.operation.DoServiceHandler
Direct Known Subclasses:
DoServiceAnonymousHandler, DoServicePasswordHandler, DoServiceSessionHandler

public abstract class DoServiceHandler
extends java.lang.Object

This base class will makes the connection to the requested service on the "hidden" machines. Every Subclass must implement the handleRequest method to check the credentials. A call to another service can only be made, if the requestAllowed values is true;

Since:
2.0
Version:
2.0, $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $
Author:
Rutger Bezema, last edited by: $Author: mschneider $

Constructor Summary
DoServiceHandler()
           
 
Method Summary
abstract  void handleRequest(DoService request)
          Each subclass must implement this method, appropriate to its needs.
 boolean requestAllowed()
           
 DoServiceResponse sendRequest(DoService request, java.net.URL securedService, java.lang.String requestedCharset, int timeout, java.lang.String securedServiceName)
          This method does the actual request to the secured service.
 void setRequestAllowed(boolean isAllowed)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoServiceHandler

public DoServiceHandler()
Method Detail

handleRequest

public abstract void handleRequest(DoService request)
                            throws DoServiceException
Each subclass must implement this method, appropriate to its needs. For example password handling.

Parameters:
request - the request the client sent to the secured service
Throws:
DoServiceException - if an error occured while processing the clients credentials.

requestAllowed

public boolean requestAllowed()
Returns:
Returns the requestAllowed.

setRequestAllowed

public void setRequestAllowed(boolean isAllowed)
Parameters:
isAllowed - The requestAllowed to set.

sendRequest

public DoServiceResponse sendRequest(DoService request,
                                     java.net.URL securedService,
                                     java.lang.String requestedCharset,
                                     int timeout,
                                     java.lang.String securedServiceName)
                              throws DoServiceException
This method does the actual request to the secured service. It returns the response of the secured service as an inputstream. It also replace the GetCapabilities request - responses with the facadeurl given by the client.

Parameters:
request - send by the client a DoService Request.
securedService - the service for which this wss is proxying, must be put in the deegreeparams of the configuration file.
requestedCharset - this wss uses, also read from the deegreeparams in the configuration file.
timeout - how long to wait for a response. Service dependable therefor also read from the deegreeparams in the config file.
securedServiceName - the name of the service for which we are proxying -> config.
Returns:
the http response of the secured service as an inputstream.
Throws:
DoServiceException - if an error occurs wile sending the request or treating the response. see org.deegree.ogcwebservices.csw.manager.CatalogueHarvester#getNextMetadataRecord

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org