Apache CXF API

org.apache.cxf.javascript
Class JavascriptQueryHandler

java.lang.Object
  extended by org.apache.cxf.javascript.JavascriptQueryHandler
All Implemented Interfaces:
QueryHandler, StemMatchingQueryHandler

public class JavascriptQueryHandler
extends Object
implements StemMatchingQueryHandler


Constructor Summary
JavascriptQueryHandler(Bus b)
           
 
Method Summary
 String getResponseContentType(String fullQueryString, String ctx)
           
 boolean isRecognizedQuery(String fullQueryString, String ctx, EndpointInfo endpoint)
           
 boolean isRecognizedQuery(String baseUri, String ctx, EndpointInfo endpointInfo, boolean contextMatchExact)
           
 void setBus(Bus b)
           
 void writeResponse(String fullQueryString, String ctx, EndpointInfo endpoint, OutputStream os)
          Write query response to output stream
static void writeUtilsToResponseStream(Class<?> referenceClass, OutputStream outputStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavascriptQueryHandler

public JavascriptQueryHandler(Bus b)
Method Detail

setBus

public final void setBus(Bus b)

getResponseContentType

public String getResponseContentType(String fullQueryString,
                                     String ctx)
Specified by:
getResponseContentType in interface QueryHandler
Parameters:
fullQueryString - the target full query string (with params) of the request
ctx - the context that was set for this invokation
Returns:
the content-type for the response

isRecognizedQuery

public boolean isRecognizedQuery(String baseUri,
                                 String ctx,
                                 EndpointInfo endpointInfo,
                                 boolean contextMatchExact)
Specified by:
isRecognizedQuery in interface StemMatchingQueryHandler
Parameters:
baseUri - the target full query string (with params) of the request
ctx - the context that was set for this invokation
endpointInfo - the current endpoint for this context (e.g. the endpoint this Destination was activated for). Null if no current endpoint.
contextMatchExact - true if contextMatchStrategy is "exact" false otherwise
Returns:
true iff the URI is a recognized WSDL query

writeUtilsToResponseStream

public static void writeUtilsToResponseStream(Class<?> referenceClass,
                                              OutputStream outputStream)

writeResponse

public void writeResponse(String fullQueryString,
                          String ctx,
                          EndpointInfo endpoint,
                          OutputStream os)
Description copied from interface: QueryHandler
Write query response to output stream

Specified by:
writeResponse in interface QueryHandler
Parameters:
fullQueryString - the target full query string (with params) of the request
ctx - the context that was set for this invokation
endpoint - the current endpoint for this context (e.g. the endpoint this Destination was activated for). Null if no current endpoint.

isRecognizedQuery

public boolean isRecognizedQuery(String fullQueryString,
                                 String ctx,
                                 EndpointInfo endpoint)
Specified by:
isRecognizedQuery in interface QueryHandler
Parameters:
fullQueryString - the target full query string (with params) of the request
ctx - the context that was set for this invokation
endpoint - the current endpoint for this context (e.g. the endpoint this Destination was activated for). Null if no current endpoint.
Returns:
true iff the URI is a recognized WSDL query

Apache CXF API

Apache CXF