org.apache.cxf.transport.http
Class AbstractHTTPDestination

java.lang.Object
  extended by org.apache.cxf.transport.AbstractObservable
      extended by org.apache.cxf.transport.AbstractDestination
          extended by org.apache.cxf.transport.AbstractMultiplexDestination
              extended by org.apache.cxf.transport.http.AbstractHTTPDestination
All Implemented Interfaces:
org.apache.cxf.configuration.Configurable, org.apache.cxf.transport.Assertor, org.apache.cxf.transport.Destination, org.apache.cxf.transport.DestinationWithEndpoint, org.apache.cxf.transport.MultiplexDestination, org.apache.cxf.transport.Observable
Direct Known Subclasses:
ServletDestination

public abstract class AbstractHTTPDestination
extends org.apache.cxf.transport.AbstractMultiplexDestination
implements org.apache.cxf.configuration.Configurable, org.apache.cxf.transport.Assertor

Common base for HTTP Destination implementations.


Nested Class Summary
 class AbstractHTTPDestination.BackChannelConduit
          Backchannel conduit.
static class AbstractHTTPDestination.PrincipalAuthorizationPolicy
           
 
Nested classes/interfaces inherited from class org.apache.cxf.transport.AbstractDestination
org.apache.cxf.transport.AbstractDestination.AbstractBackChannelConduit
 
Field Summary
protected  org.apache.cxf.Bus bus
           
protected  CertConstraints certConstraints
           
protected  String contextMatchStrategy
           
protected  ContinuationProviderFactory cproviderFactory
           
static String CXF_ASYNC_CONTEXT
           
static String CXF_CONTINUATION_MESSAGE
           
protected  boolean enableWebSocket
           
protected  boolean fixedParameterOrder
           
static String HTTP_CONFIG
           
static String HTTP_CONTEXT
           
static String HTTP_CONTEXT_MATCH_STRATEGY
           
static String HTTP_REQUEST
           
static String HTTP_RESPONSE
           
protected  boolean isServlet3
           
protected  boolean multiplexWithAddress
           
protected  String path
           
protected  DestinationRegistry registry
           
static String REQUEST_REDIRECTED
           
static String RESPONSE_COMMITED
           
static String RESPONSE_HEADERS_COPIED
           
protected  HTTPServerPolicy serverPolicy
           
static String SERVICE_REDIRECTION
           
 
Fields inherited from class org.apache.cxf.transport.AbstractDestination
endpointInfo, reference
 
Fields inherited from class org.apache.cxf.transport.AbstractObservable
incomingObserver
 
Constructor Summary
AbstractHTTPDestination(org.apache.cxf.Bus b, DestinationRegistry registry, org.apache.cxf.service.model.EndpointInfo ei, String path, boolean dp)
          Constructor
 
Method Summary
protected  void activate()
           
 void assertMessage(org.apache.cxf.message.Message message)
           
 boolean canAssert(QName type)
           
protected  boolean contextMatchOnExact()
           
protected  void deactivate()
           
 void finalizeConfig()
           
protected  OutputStream flushHeaders(org.apache.cxf.message.Message outMessage)
           
protected  OutputStream flushHeaders(org.apache.cxf.message.Message outMessage, boolean getStream)
           
protected static org.apache.cxf.service.model.EndpointInfo getAddressValue(org.apache.cxf.service.model.EndpointInfo ei)
           
protected static org.apache.cxf.service.model.EndpointInfo getAddressValue(org.apache.cxf.service.model.EndpointInfo ei, boolean dp)
           
 org.apache.cxf.ws.addressing.EndpointReferenceType getAddressWithId(String id)
           
protected  String getBasePath(String contextPath)
           
 String getBeanName()
           
 org.apache.cxf.Bus getBus()
           
 String getContextMatchStrategy()
           
 String getId(Map<String,Object> context)
           
protected  org.apache.cxf.transport.Conduit getInbuiltBackChannel(org.apache.cxf.message.Message inMessage)
           
 String getPath()
           
 HTTPServerPolicy getServer()
           
 void invoke(javax.servlet.ServletConfig config, javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  void invokeComplete(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, org.apache.cxf.message.Message m)
           
 boolean isFixedParameterOrder()
           
 boolean isMultiplexWithAddress()
           
protected  boolean isOneWay(org.apache.cxf.message.Message message)
           
 void releaseRegistry()
           
protected  org.apache.cxf.message.Message retrieveFromContinuation(javax.servlet.http.HttpServletRequest req)
           
protected  org.apache.cxf.message.Message retrieveFromServlet3Async(javax.servlet.http.HttpServletRequest req)
           
 void setContextMatchStrategy(String contextMatchStrategy)
           
 void setFixedParameterOrder(boolean fixedParameterOrder)
           
 void setMultiplexWithAddress(boolean multiplexWithAddress)
           
 void setServer(HTTPServerPolicy server)
           
protected  void setupContinuation(org.apache.cxf.message.Message inMessage, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
protected  void setupMessage(org.apache.cxf.message.Message inMessage, javax.servlet.ServletConfig config, javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
           
 void shutdown()
           
 
Methods inherited from class org.apache.cxf.transport.AbstractDestination
getAddress, getBackChannel, getEndpointInfo
 
Methods inherited from class org.apache.cxf.transport.AbstractObservable
getLogger, getMessageObserver, getTargetReference, getTargetReference, setMessageObserver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cxf.transport.Destination
getAddress, getBackChannel, getMessageObserver
 
Methods inherited from interface org.apache.cxf.transport.Observable
setMessageObserver
 

Field Detail

HTTP_REQUEST

public static final String HTTP_REQUEST
See Also:
Constant Field Values

HTTP_RESPONSE

public static final String HTTP_RESPONSE
See Also:
Constant Field Values

HTTP_CONTEXT

public static final String HTTP_CONTEXT
See Also:
Constant Field Values

HTTP_CONFIG

public static final String HTTP_CONFIG
See Also:
Constant Field Values

HTTP_CONTEXT_MATCH_STRATEGY

public static final String HTTP_CONTEXT_MATCH_STRATEGY
See Also:
Constant Field Values

RESPONSE_HEADERS_COPIED

public static final String RESPONSE_HEADERS_COPIED
See Also:
Constant Field Values

RESPONSE_COMMITED

public static final String RESPONSE_COMMITED
See Also:
Constant Field Values

REQUEST_REDIRECTED

public static final String REQUEST_REDIRECTED
See Also:
Constant Field Values

CXF_CONTINUATION_MESSAGE

public static final String CXF_CONTINUATION_MESSAGE
See Also:
Constant Field Values

CXF_ASYNC_CONTEXT

public static final String CXF_ASYNC_CONTEXT
See Also:
Constant Field Values

SERVICE_REDIRECTION

public static final String SERVICE_REDIRECTION
See Also:
Constant Field Values

bus

protected final org.apache.cxf.Bus bus

registry

protected DestinationRegistry registry

path

protected final String path

serverPolicy

protected volatile HTTPServerPolicy serverPolicy

contextMatchStrategy

protected String contextMatchStrategy

fixedParameterOrder

protected boolean fixedParameterOrder

multiplexWithAddress

protected boolean multiplexWithAddress

certConstraints

protected CertConstraints certConstraints

isServlet3

protected boolean isServlet3

cproviderFactory

protected ContinuationProviderFactory cproviderFactory

enableWebSocket

protected boolean enableWebSocket
Constructor Detail

AbstractHTTPDestination

public AbstractHTTPDestination(org.apache.cxf.Bus b,
                               DestinationRegistry registry,
                               org.apache.cxf.service.model.EndpointInfo ei,
                               String path,
                               boolean dp)
                        throws IOException
Constructor

Parameters:
b - the associated Bus
ci - the associated conduit initiator
ei - the endpoint info of the destination
dp - true for adding the default port if it is missing
Throws:
IOException
Method Detail

getBus

public org.apache.cxf.Bus getBus()

isOneWay

protected final boolean isOneWay(org.apache.cxf.message.Message message)
Parameters:
message - the message under consideration
Returns:
true iff the message has been marked as oneway

invoke

public void invoke(javax.servlet.ServletConfig config,
                   javax.servlet.ServletContext context,
                   javax.servlet.http.HttpServletRequest req,
                   javax.servlet.http.HttpServletResponse resp)
            throws IOException
Throws:
IOException

invokeComplete

protected void invokeComplete(javax.servlet.ServletContext context,
                              javax.servlet.http.HttpServletRequest req,
                              javax.servlet.http.HttpServletResponse resp,
                              org.apache.cxf.message.Message m)
                       throws IOException
Throws:
IOException

setupMessage

protected void setupMessage(org.apache.cxf.message.Message inMessage,
                            javax.servlet.ServletConfig config,
                            javax.servlet.ServletContext context,
                            javax.servlet.http.HttpServletRequest req,
                            javax.servlet.http.HttpServletResponse resp)
                     throws IOException
Throws:
IOException

retrieveFromContinuation

protected org.apache.cxf.message.Message retrieveFromContinuation(javax.servlet.http.HttpServletRequest req)

retrieveFromServlet3Async

protected org.apache.cxf.message.Message retrieveFromServlet3Async(javax.servlet.http.HttpServletRequest req)

setupContinuation

protected void setupContinuation(org.apache.cxf.message.Message inMessage,
                                 javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse resp)

getBasePath

protected String getBasePath(String contextPath)
                      throws IOException
Throws:
IOException

getAddressValue

protected static org.apache.cxf.service.model.EndpointInfo getAddressValue(org.apache.cxf.service.model.EndpointInfo ei)

getAddressValue

protected static org.apache.cxf.service.model.EndpointInfo getAddressValue(org.apache.cxf.service.model.EndpointInfo ei,
                                                                           boolean dp)

getInbuiltBackChannel

protected org.apache.cxf.transport.Conduit getInbuiltBackChannel(org.apache.cxf.message.Message inMessage)
Specified by:
getInbuiltBackChannel in class org.apache.cxf.transport.AbstractDestination
Parameters:
inMessage - the incoming message
Returns:
the inbuilt backchannel

flushHeaders

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

flushHeaders

protected OutputStream flushHeaders(org.apache.cxf.message.Message outMessage,
                                    boolean getStream)
                             throws IOException
Throws:
IOException

contextMatchOnExact

protected boolean contextMatchOnExact()

finalizeConfig

public void finalizeConfig()

getBeanName

public String getBeanName()
Specified by:
getBeanName in interface org.apache.cxf.configuration.Configurable

getAddressWithId

public org.apache.cxf.ws.addressing.EndpointReferenceType getAddressWithId(String id)
Specified by:
getAddressWithId in interface org.apache.cxf.transport.MultiplexDestination
Overrides:
getAddressWithId in class org.apache.cxf.transport.AbstractMultiplexDestination

getId

public String getId(Map<String,Object> context)
Specified by:
getId in interface org.apache.cxf.transport.MultiplexDestination
Overrides:
getId in class org.apache.cxf.transport.AbstractMultiplexDestination

getContextMatchStrategy

public String getContextMatchStrategy()

setContextMatchStrategy

public void setContextMatchStrategy(String contextMatchStrategy)

isFixedParameterOrder

public boolean isFixedParameterOrder()

setFixedParameterOrder

public void setFixedParameterOrder(boolean fixedParameterOrder)

isMultiplexWithAddress

public boolean isMultiplexWithAddress()

setMultiplexWithAddress

public void setMultiplexWithAddress(boolean multiplexWithAddress)

getServer

public HTTPServerPolicy getServer()

setServer

public void setServer(HTTPServerPolicy server)

assertMessage

public void assertMessage(org.apache.cxf.message.Message message)
Specified by:
assertMessage in interface org.apache.cxf.transport.Assertor

canAssert

public boolean canAssert(QName type)
Specified by:
canAssert in interface org.apache.cxf.transport.Assertor

releaseRegistry

public void releaseRegistry()

getPath

public String getPath()

activate

protected void activate()
Overrides:
activate in class org.apache.cxf.transport.AbstractObservable

deactivate

protected void deactivate()
Overrides:
deactivate in class org.apache.cxf.transport.AbstractObservable

shutdown

public void shutdown()
Specified by:
shutdown in interface org.apache.cxf.transport.Destination
Overrides:
shutdown in class org.apache.cxf.transport.AbstractDestination


Apache CXF