|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cxf.transport.AbstractObservable
org.apache.cxf.transport.AbstractConduit
org.apache.cxf.transport.http.HTTPConduit
public class HTTPConduit
This Conduit handles the "http" and "https" transport protocols. An instance is governed by policies either explicitly set or by configuration.
Nested Class Summary | |
---|---|
protected class |
HTTPConduit.InterposedMessageObserver
Used to set appropriate message properties, exchange etc. |
protected class |
HTTPConduit.WrappedOutputStream
Wrapper output stream responsible for flushing headers and handling the incoming HTTP-level response (not necessarily the MEP response). |
Field Summary | |
---|---|
protected HttpURLConnectionFactory |
connectionFactory
This field holds the connection factory, which primarily is used to factor out SSL specific code from this implementation. |
static java.lang.String |
KEY_HTTP_CONNECTION
This constant is the Message(Map) key for the HttpURLConnection that is used to get the response. |
Fields inherited from class org.apache.cxf.transport.AbstractConduit |
---|
target |
Fields inherited from class org.apache.cxf.transport.AbstractObservable |
---|
incomingObserver |
Constructor Summary | |
---|---|
HTTPConduit(Bus b,
EndpointInfo ei)
Constructor |
|
HTTPConduit(Bus b,
EndpointInfo ei,
org.apache.cxf.ws.addressing.EndpointReferenceType t)
Constructor |
Method Summary | |
---|---|
void |
assertMessage(Message message)
|
boolean |
canAssert(javax.xml.namespace.QName type)
|
void |
close()
Close the conduit |
void |
close(Message msg)
Close the connections associated with the message |
protected void |
finalizeConfig()
This call gets called by the HTTPTransportFactory after it causes an injection of the Spring configuration properties of this Conduit. |
protected java.lang.String |
getAddress()
|
org.apache.cxf.configuration.security.AuthorizationPolicy |
getAuthorization()
This method gets the Authorization Policy that was configured or explicitly set for this HTTPConduit. |
HttpAuthSupplier |
getAuthSupplier()
This method gets the Auth Supplier that was set/configured for this HTTPConduit. |
Destination |
getBackChannel()
Retreive the back-channel Destination. |
java.lang.String |
getBeanName()
This is part of the Configurable interface which retrieves the configuration from spring injection. |
org.apache.cxf.transports.http.configuration.HTTPClientPolicy |
getClient()
This method retrieves the Client Side Policy set/configured for this HTTPConduit. |
org.apache.cxf.transports.http.configuration.HTTPClientPolicy |
getClient(Message message)
|
java.lang.String |
getConduitName()
This method returns the name of the conduit, which is based on the endpoint name plus the SC_HTTP_CONDUIT_SUFFIX. |
protected HttpURLConnectionFactory |
getConnectionFactory(java.net.URL url)
|
java.util.Map<java.lang.String,org.apache.cxf.transport.http.Cookie> |
getCookies()
Allow access to the cookies that the conduit is maintaining |
protected MessageObserver |
getDecoupledObserver()
|
protected java.util.logging.Logger |
getLogger()
This method returns the registered Logger for this conduit. |
protected static java.io.InputStream |
getPartialResponse(java.net.HttpURLConnection connection,
int responseCode)
Get an input stream containing the partial response if one is present. |
org.apache.cxf.configuration.security.ProxyAuthorizationPolicy |
getProxyAuthorization()
This method retrieves the Proxy Authorization Policy for a proxy that is set/configured for this HTTPConduit. |
TLSClientParameters |
getTlsClientParameters()
This method returns the TLS Client Parameters that is set/configured for this HTTPConduit. |
MessageTrustDecider |
getTrustDecider()
This method gets the Trust Decider that was set/configured for this HTTPConduit. |
protected java.net.URL |
getURL()
|
protected java.net.URL |
getURL(boolean createOnDemand)
|
void |
prepare(Message message)
Prepare to send an outbound HTTP message over this http conduit to a particular endpoint. |
protected void |
retrieveConnectionFactory()
This method sets the connectionFactory field for this object. |
protected void |
retrieveConnectionFactory(java.lang.String url)
|
void |
setAuthorization(org.apache.cxf.configuration.security.AuthorizationPolicy authorization)
This method is used to set the Authorization Policy for this conduit. |
void |
setAuthSupplier(HttpAuthSupplier supplier)
|
void |
setBasicAuthSupplier(HttpBasicAuthSupplier basicAuthSupplier)
Deprecated. |
void |
setClient(org.apache.cxf.transports.http.configuration.HTTPClientPolicy client)
This method sets the Client Side Policy for this HTTPConduit. |
void |
setProxyAuthorization(org.apache.cxf.configuration.security.ProxyAuthorizationPolicy proxyAuthorization)
This method sets the Proxy Authorization Policy for a specified proxy. |
void |
setTlsClientParameters(TLSClientParameters params)
This method sets the TLS Client Parameters for this HTTPConduit. |
void |
setTrustDecider(MessageTrustDecider decider)
This method sets the Trust Decider for this HTTP Conduit. |
Methods inherited from class org.apache.cxf.transport.AbstractConduit |
---|
getTarget, toString |
Methods inherited from class org.apache.cxf.transport.AbstractObservable |
---|
activate, deactivate, getMessageObserver, getTargetReference, getTargetReference, setMessageObserver |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.cxf.transport.Observable |
---|
setMessageObserver |
Field Detail |
---|
public static final java.lang.String KEY_HTTP_CONNECTION
protected HttpURLConnectionFactory connectionFactory
This field is "protected" to facilitate some contrived UnitTesting so that an extended class may alter its value with an EasyMock URLConnection Factory.
Constructor Detail |
---|
public HTTPConduit(Bus b, EndpointInfo ei) throws java.io.IOException
b
- the associated Busei
- the endpoint info of the initiator
java.io.IOException
public HTTPConduit(Bus b, EndpointInfo ei, org.apache.cxf.ws.addressing.EndpointReferenceType t) throws java.io.IOException
b
- the associated Bus.endpoint
- the endpoint info of the initiator.t
- the endpoint reference of the target.
java.io.IOException
Method Detail |
---|
protected java.util.logging.Logger getLogger()
getLogger
in class AbstractObservable
public final java.lang.String getConduitName()
protected void finalizeConfig()
public java.util.Map<java.lang.String,org.apache.cxf.transport.http.Cookie> getCookies()
protected void retrieveConnectionFactory()
This method is "protected" so that this class may be extended and override this method to put an EasyMock URL Connection factory for some contrived UnitTest that will of course break, should the calls to the URL Connection Factory get altered.
protected void retrieveConnectionFactory(java.lang.String url)
protected HttpURLConnectionFactory getConnectionFactory(java.net.URL url)
public void prepare(Message message) throws java.io.IOException
If the Message.PATH_INFO property is set it gets appended to the Conduit's endpoint URL. If the Message.QUERY_STRING property is set, it gets appended to the resultant URL following a "?".
If the Message.HTTP_REQUEST_METHOD property is NOT set, the Http request method defaults to "POST".
If the Message.PROTOCOL_HEADERS is not set on the message, it is initialized to an empty map.
This call creates the OutputStream for the content of the message. It also assigns the created Http(s)URLConnection to the Message Map.
prepare
in interface Conduit
message
- The message to be sent.
java.io.IOException
public void close(Message msg) throws java.io.IOException
Conduit
close
in interface Conduit
close
in class AbstractConduit
java.io.IOException
public Destination getBackChannel()
getBackChannel
in interface Conduit
getBackChannel
in class AbstractConduit
public void close()
close
in interface Conduit
close
in class AbstractConduit
protected java.lang.String getAddress() throws java.net.MalformedURLException
java.net.MalformedURLException
protected java.net.URL getURL() throws java.net.MalformedURLException
java.net.MalformedURLException
protected java.net.URL getURL(boolean createOnDemand) throws java.net.MalformedURLException
createOnDemand
- create URL on-demand if null
java.net.MalformedURLException
protected MessageObserver getDecoupledObserver()
protected static java.io.InputStream getPartialResponse(java.net.HttpURLConnection connection, int responseCode) throws java.io.IOException
connection
- the connection in questionresponseCode
- the response code
java.io.IOException
public java.lang.String getBeanName()
getBeanName
in interface Configurable
public org.apache.cxf.configuration.security.AuthorizationPolicy getAuthorization()
public void setAuthorization(org.apache.cxf.configuration.security.AuthorizationPolicy authorization)
public org.apache.cxf.transports.http.configuration.HTTPClientPolicy getClient(Message message)
public org.apache.cxf.transports.http.configuration.HTTPClientPolicy getClient()
public void setClient(org.apache.cxf.transports.http.configuration.HTTPClientPolicy client)
public org.apache.cxf.configuration.security.ProxyAuthorizationPolicy getProxyAuthorization()
public void setProxyAuthorization(org.apache.cxf.configuration.security.ProxyAuthorizationPolicy proxyAuthorization)
public TLSClientParameters getTlsClientParameters()
public void setTlsClientParameters(TLSClientParameters params)
public MessageTrustDecider getTrustDecider()
public void setTrustDecider(MessageTrustDecider decider)
public HttpAuthSupplier getAuthSupplier()
public void setAuthSupplier(HttpAuthSupplier supplier)
public void assertMessage(Message message)
assertMessage
in interface Assertor
public boolean canAssert(javax.xml.namespace.QName type)
canAssert
in interface Assertor
@Deprecated public void setBasicAuthSupplier(HttpBasicAuthSupplier basicAuthSupplier)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |