org.mule.transport.cxf.transport
Class MuleUniversalConduit

java.lang.Object
  extended by org.apache.cxf.transport.AbstractObservable
      extended by org.apache.cxf.transport.AbstractConduit
          extended by org.mule.transport.cxf.transport.MuleUniversalConduit
All Implemented Interfaces:
org.apache.cxf.transport.Conduit, org.apache.cxf.transport.Observable

public class MuleUniversalConduit
extends org.apache.cxf.transport.AbstractConduit

A Conduit is primarily responsible for sending messages from CXF to somewhere else. This conduit takes messages which are being written and sends them to the Mule bus.


Nested Class Summary
protected  class MuleUniversalConduit.InterposedMessageObserver
          Used to set appropriate message properties, exchange etc.
 
Field Summary
 
Fields inherited from class org.apache.cxf.transport.AbstractConduit
target
 
Fields inherited from class org.apache.cxf.transport.AbstractObservable
incomingObserver
 
Constructor Summary
MuleUniversalConduit(MuleUniversalTransport transport, CxfConnector connector, org.apache.cxf.service.model.EndpointInfo ei, org.apache.cxf.ws.addressing.EndpointReferenceType t)
           
 
Method Summary
 void close()
           
 void close(org.apache.cxf.message.Message msg)
           
protected  void dispatchMuleMessage(org.apache.cxf.message.Message m)
           
protected  void duplicateDecoupledDestination()
           
 org.apache.cxf.transport.Destination getBackChannel()
           
protected  CxfConnector getConnector()
           
 String getDecoupledEndpoint()
           
protected  org.apache.cxf.service.model.EndpointInfo getEndpoint()
           
protected  Logger getLogger()
           
protected  OutboundEndpoint getProtocolEndpoint(String uri)
           
protected  InputStream getResponseBody(org.apache.cxf.message.Message m, MuleMessage result)
           
protected  String getTargetOrEndpoint()
           
protected static org.apache.cxf.ws.addressing.EndpointReferenceType getTargetReference(org.apache.cxf.service.model.EndpointInfo ei, org.apache.cxf.ws.addressing.EndpointReferenceType t)
          Get the target endpoint reference.
protected  MuleUniversalTransport getTransport()
           
protected  OutboundEndpoint initializeProtocolEndpoint(String uri)
           
protected  boolean isOneway(org.apache.cxf.message.Exchange exchange)
           
 void onClose(org.apache.cxf.message.Message m)
           
 void prepare(org.apache.cxf.message.Message message)
          Prepare the message for writing.
protected  void releaseDecoupledDestination()
           
protected  MuleMessage sendStream(MessageAdapter sa, OutboundEndpoint ep, org.apache.cxf.message.Exchange exchange)
           
 void setApplyTransformersToProtocol(boolean applyTransformersToProtocol)
           
 void setCloseInput(boolean closeInput)
           
 void setDecoupledEndpoint(String decoupledEndpoint)
           
 void setMuleEndpoint(ImmutableEndpoint muleEndpoint)
           
protected  void setUpDecoupledDestination()
           
protected  String setupURL(org.apache.cxf.message.Message message)
           
 
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
 

Constructor Detail

MuleUniversalConduit

public MuleUniversalConduit(MuleUniversalTransport transport,
                            CxfConnector connector,
                            org.apache.cxf.service.model.EndpointInfo ei,
                            org.apache.cxf.ws.addressing.EndpointReferenceType t)
Parameters:
ei - The Endpoint being invoked by this destination.
t - The EPR associated with this Conduit - i.e. the reply destination.
Method Detail

close

public void close(org.apache.cxf.message.Message msg)
           throws IOException
Specified by:
close in interface org.apache.cxf.transport.Conduit
Overrides:
close in class org.apache.cxf.transport.AbstractConduit
Throws:
IOException

getLogger

protected Logger getLogger()
Specified by:
getLogger in class org.apache.cxf.transport.AbstractObservable

getBackChannel

public org.apache.cxf.transport.Destination getBackChannel()
Specified by:
getBackChannel in interface org.apache.cxf.transport.Conduit
Overrides:
getBackChannel in class org.apache.cxf.transport.AbstractConduit

setUpDecoupledDestination

protected void setUpDecoupledDestination()

prepare

public void prepare(org.apache.cxf.message.Message message)
             throws IOException
Prepare the message for writing.

Throws:
IOException

dispatchMuleMessage

protected void dispatchMuleMessage(org.apache.cxf.message.Message m)
                            throws IOException
Throws:
IOException

getProtocolEndpoint

protected OutboundEndpoint getProtocolEndpoint(String uri)
                                        throws MuleException
Throws:
MuleException

initializeProtocolEndpoint

protected OutboundEndpoint initializeProtocolEndpoint(String uri)
                                               throws MuleException
Throws:
MuleException

getResponseBody

protected InputStream getResponseBody(org.apache.cxf.message.Message m,
                                      MuleMessage result)
                               throws TransformerException,
                                      IOException
Throws:
TransformerException
IOException

isOneway

protected boolean isOneway(org.apache.cxf.message.Exchange exchange)

setupURL

protected String setupURL(org.apache.cxf.message.Message message)
                   throws MalformedURLException
Throws:
MalformedURLException

getTargetOrEndpoint

protected String getTargetOrEndpoint()

onClose

public void onClose(org.apache.cxf.message.Message m)
             throws IOException
Throws:
IOException

sendStream

protected MuleMessage sendStream(MessageAdapter sa,
                                 OutboundEndpoint ep,
                                 org.apache.cxf.message.Exchange exchange)
                          throws MuleException
Throws:
MuleException

close

public void close()
Specified by:
close in interface org.apache.cxf.transport.Conduit
Overrides:
close in class org.apache.cxf.transport.AbstractConduit

duplicateDecoupledDestination

protected void duplicateDecoupledDestination()

releaseDecoupledDestination

protected void releaseDecoupledDestination()

getDecoupledEndpoint

public String getDecoupledEndpoint()

setDecoupledEndpoint

public void setDecoupledEndpoint(String decoupledEndpoint)

getTargetReference

protected static org.apache.cxf.ws.addressing.EndpointReferenceType getTargetReference(org.apache.cxf.service.model.EndpointInfo ei,
                                                                                       org.apache.cxf.ws.addressing.EndpointReferenceType t)
Get the target endpoint reference.

Parameters:
ei - the corresponding EndpointInfo
t - the given target EPR if available
bus - the Bus
Returns:
the actual target

setCloseInput

public void setCloseInput(boolean closeInput)

setApplyTransformersToProtocol

public void setApplyTransformersToProtocol(boolean applyTransformersToProtocol)

getConnector

protected CxfConnector getConnector()

getEndpoint

protected org.apache.cxf.service.model.EndpointInfo getEndpoint()

getTransport

protected MuleUniversalTransport getTransport()

setMuleEndpoint

public void setMuleEndpoint(ImmutableEndpoint muleEndpoint)


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.