org.deegree_impl.services.wms
Class GetMapHandler_Impl.ServiceInvokerForNL

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.deegree_impl.services.wms.GetMapHandler_Impl.ServiceInvokerForNL
All Implemented Interfaces:
OGCWebServiceClient, java.lang.Runnable
Enclosing class:
GetMapHandler_Impl

private class GetMapHandler_Impl.ServiceInvokerForNL
extends java.lang.Thread
implements OGCWebServiceClient

Inner class for accessing the data of one named layer and creating DisplayElements and a Thrme from it. The class extends Thread and implements the run method, so that a parallel data accessing from several layers is possible.

Version:
$Revision: 1.1 $
Author:
Andreas Poth

Field Summary
private  int index
           
private  Layer layer
           
private  UserStyle[] styles
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
(package private) GetMapHandler_Impl.ServiceInvokerForNL(Layer layer, UserStyle[] styles, int index)
          Creates a new ServiceInvokerForNL object.
 
Method Summary
private  OGCWebServiceEvent createGetCoverageRequest(DataSource ds)
          creates a getCoverage request considering the getMap request and the filterconditions defined in the submitted DataSource object The request will be encapsualted within a OGCWebServiceEvent.
private  OGCWebServiceEvent createGetFeatureRequest(DataSource ds)
          creates a getFeature request considering the getMap request and the filterconditions defined in the submitted DataSource object.
private  OGCWebServiceEvent createGetMapRequest(DataSource ds)
          creates a getMap request for requesting a cascaded remote WMS considering the getMap request and the filterconditions defined in the submitted DataSource object The request will be encapsualted within a OGCWebServiceEvent.
private  void handleGetCoverageResponse(WCSGetCoverageResponse response)
          handles the response of a WCS and calls a factory to create DisplayElement and a Theme from it
private  void handleGetFeatureResponse(WFSGetFeatureResponse response)
          handles the response of a WFS and calls a factory to create DisplayElement and a Theme from it
private  void handleGetMapResponse(WMSGetMapResponse response)
          handles the response of a cascaded WMS and calls a factory to create DisplayElement and a Theme from it
 void run()
          overrides the run-method of the parent class Thread for enabling a multi-threaded access to the data.
 void write(java.lang.Object result)
          The method implements the OGCWebServiceClient interface.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

layer

private Layer layer

styles

private UserStyle[] styles

index

private int index
Constructor Detail

GetMapHandler_Impl.ServiceInvokerForNL

GetMapHandler_Impl.ServiceInvokerForNL(Layer layer,
                                       UserStyle[] styles,
                                       int index)
Creates a new ServiceInvokerForNL object.

Parameters:
layer -
index - index of the requested layer
Method Detail

run

public void run()
overrides the run-method of the parent class Thread for enabling a multi-threaded access to the data.

Specified by:
run in interface java.lang.Runnable

createGetFeatureRequest

private OGCWebServiceEvent createGetFeatureRequest(DataSource ds)
                                            throws java.lang.Exception
creates a getFeature request considering the getMap request and the filterconditions defined in the submitted DataSource object. The request will be encapsualted within a OGCWebServiceEvent.

Returns:
envent object containing a GetFeature request
Throws:
java.lang.Exception

createGetCoverageRequest

private OGCWebServiceEvent createGetCoverageRequest(DataSource ds)
                                             throws InconsistentRequestException
creates a getCoverage request considering the getMap request and the filterconditions defined in the submitted DataSource object The request will be encapsualted within a OGCWebServiceEvent.

Returns:
envent object containing a GetCoverage request
Throws:
InconsistentRequestException

createGetMapRequest

private OGCWebServiceEvent createGetMapRequest(DataSource ds)
                                        throws XMLParsingException
creates a getMap request for requesting a cascaded remote WMS considering the getMap request and the filterconditions defined in the submitted DataSource object The request will be encapsualted within a OGCWebServiceEvent.

Returns:
envent object containing a GetMap request
Throws:
XMLParsingException

write

public void write(java.lang.Object result)
The method implements the OGCWebServiceClient interface. So a deegree OWS implementation accessed by this class is able to return the result of a request by calling the write-method.

Specified by:
write in interface OGCWebServiceClient
Parameters:
result - to a GetXXX request

handleGetMapResponse

private void handleGetMapResponse(WMSGetMapResponse response)
                           throws java.lang.Exception
handles the response of a cascaded WMS and calls a factory to create DisplayElement and a Theme from it

Throws:
java.lang.Exception

handleGetFeatureResponse

private void handleGetFeatureResponse(WFSGetFeatureResponse response)
                               throws java.lang.Exception
handles the response of a WFS and calls a factory to create DisplayElement and a Theme from it

Throws:
java.lang.Exception

handleGetCoverageResponse

private void handleGetCoverageResponse(WCSGetCoverageResponse response)
                                throws java.lang.Exception
handles the response of a WCS and calls a factory to create DisplayElement and a Theme from it

Throws:
java.lang.Exception