org.apache.cxf.transport.http
Class JettyHTTPDestination

java.lang.Object
  extended by HTTPDestinationConfigBean
      extended by org.apache.cxf.transport.http.AbstractHTTPDestination
          extended by org.apache.cxf.transport.http.JettyHTTPDestination
All Implemented Interfaces:
org.apache.cxf.transport.Destination, org.apache.cxf.transport.Observable

public class JettyHTTPDestination
extends AbstractHTTPDestination


Nested Class Summary
protected  class JettyHTTPDestination.BackChannelConduit
          Backchannel conduit.
 
Field Summary
protected  ServerEngine alternateEngine
           
protected static java.lang.String ANONYMOUS_ADDRESS
           
protected  ServerEngine engine
           
static java.lang.String HTTP_REQUEST
           
static java.lang.String HTTP_RESPONSE
           
protected  org.apache.cxf.transport.MessageObserver incomingObserver
           
 
Fields inherited from class org.apache.cxf.transport.http.AbstractHTTPDestination
bus, conduitInitiator, endpointInfo, name, nurl, reference
 
Constructor Summary
JettyHTTPDestination(org.apache.cxf.Bus b, org.apache.cxf.transport.ConduitInitiator ci, org.apache.cxf.service.model.EndpointInfo endpointInfo)
          Constructor, using Jetty server engine.
JettyHTTPDestination(org.apache.cxf.Bus b, org.apache.cxf.transport.ConduitInitiator ci, org.apache.cxf.service.model.EndpointInfo endpointInfo, ServerEngine eng)
          Constructor, allowing subsititution of server engine.
 
Method Summary
protected  void copyRequestHeaders(org.apache.cxf.message.Message message, java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
          Copy the request headers into the message.
protected  void copyResponseHeaders(org.apache.cxf.message.Message message, org.mortbay.http.HttpResponse response)
          Copy the response headers into the response.
protected  void doService(org.mortbay.http.HttpRequest req, org.mortbay.http.HttpResponse resp)
           
protected  java.io.OutputStream flushHeaders(org.apache.cxf.message.Message outMessage)
           
 org.apache.cxf.transport.Conduit getBackChannel(org.apache.cxf.message.Message inMessage, org.apache.cxf.message.Message partialResponse, org.apache.cxf.ws.addressing.EndpointReferenceType address)
          Retreive a back-channel Conduit, which must be policy-compatible with the current Message and associated Destination.
protected  void retrieveEngine()
           
protected  void serviceRequest(org.mortbay.http.HttpRequest req, org.mortbay.http.HttpResponse resp)
           
 void setMessageObserver(org.apache.cxf.transport.MessageObserver observer)
          Register a message observer for incoming messages.
 void shutdown()
          Shutdown the Destination, i.e.
 
Methods inherited from class org.apache.cxf.transport.http.AbstractHTTPDestination
getAddress, getAddressValue, getBeanName, isOneWay, setHeaders, updateResponseHeaders
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HTTP_REQUEST

public static final java.lang.String HTTP_REQUEST

HTTP_RESPONSE

public static final java.lang.String HTTP_RESPONSE

ANONYMOUS_ADDRESS

protected static final java.lang.String ANONYMOUS_ADDRESS
See Also:
Constant Field Values

engine

protected ServerEngine engine

alternateEngine

protected ServerEngine alternateEngine

incomingObserver

protected org.apache.cxf.transport.MessageObserver incomingObserver
Constructor Detail

JettyHTTPDestination

public JettyHTTPDestination(org.apache.cxf.Bus b,
                            org.apache.cxf.transport.ConduitInitiator ci,
                            org.apache.cxf.service.model.EndpointInfo endpointInfo)
                     throws java.io.IOException
Constructor, using Jetty server engine.

Parameters:
b - the associated Bus
ci - the associated conduit initiator
endpointInfo - the endpoint info of the destination
Throws:
java.io.IOException

JettyHTTPDestination

public JettyHTTPDestination(org.apache.cxf.Bus b,
                            org.apache.cxf.transport.ConduitInitiator ci,
                            org.apache.cxf.service.model.EndpointInfo endpointInfo,
                            ServerEngine eng)
                     throws java.io.IOException
Constructor, allowing subsititution of server engine.

Parameters:
b - the associated Bus
ci - the associated conduit initiator
endpointInfo - the endpoint info of the destination
eng - the server engine
Throws:
java.io.IOException
Method Detail

retrieveEngine

protected void retrieveEngine()

setMessageObserver

public void setMessageObserver(org.apache.cxf.transport.MessageObserver observer)
Register a message observer for incoming messages.

Parameters:
observer - the observer to notify on receipt of incoming

getBackChannel

public org.apache.cxf.transport.Conduit getBackChannel(org.apache.cxf.message.Message inMessage,
                                                       org.apache.cxf.message.Message partialResponse,
                                                       org.apache.cxf.ws.addressing.EndpointReferenceType address)
                                                throws java.io.IOException
Retreive a back-channel Conduit, which must be policy-compatible with the current Message and associated Destination. For example compatible Quality of Protection must be asserted on the back-channel. This would generally only be an issue if the back-channel is decoupled.

Parameters:
inMessage - the current inbound message (null to indicate a disassociated back-channel)
partialResponse - in the decoupled case, this is expected to be the outbound Message to be sent over the in-built back-channel.
address - the backchannel address (null to indicate anonymous)
Returns:
a suitable Conduit
Throws:
java.io.IOException

shutdown

public void shutdown()
Shutdown the Destination, i.e. stop accepting incoming messages.


copyRequestHeaders

protected void copyRequestHeaders(org.apache.cxf.message.Message message,
                                  java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
Copy the request headers into the message.

Specified by:
copyRequestHeaders in class AbstractHTTPDestination
Parameters:
message - the current message
headers - the current set of headers

copyResponseHeaders

protected void copyResponseHeaders(org.apache.cxf.message.Message message,
                                   org.mortbay.http.HttpResponse response)
Copy the response headers into the response.

Parameters:
message - the current message
headers - the current set of headers

doService

protected void doService(org.mortbay.http.HttpRequest req,
                         org.mortbay.http.HttpResponse resp)
                  throws java.io.IOException
Throws:
java.io.IOException

serviceRequest

protected void serviceRequest(org.mortbay.http.HttpRequest req,
                              org.mortbay.http.HttpResponse resp)
                       throws java.io.IOException
Throws:
java.io.IOException

flushHeaders

protected java.io.OutputStream flushHeaders(org.apache.cxf.message.Message outMessage)
                                     throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2006 Apache Software Foundation. All Rights Reserved.