org.apache.servicemix.components.util
Class StreamWriterComponent

java.lang.Object
  extended by org.apache.servicemix.jbi.management.BaseLifeCycle
      extended by org.apache.servicemix.components.util.PojoSupport
          extended by org.apache.servicemix.components.util.ComponentSupport
              extended by org.apache.servicemix.components.util.OutBinding
                  extended by org.apache.servicemix.components.util.StreamWriterComponent
All Implemented Interfaces:
Runnable, javax.jbi.component.Component, javax.jbi.component.ComponentLifeCycle, javax.jbi.management.LifeCycleMBean, org.apache.servicemix.jbi.listener.MessageExchangeListener, MBeanInfoProvider

public class StreamWriterComponent
extends OutBinding

A Component that dumps a message to a stream

Version:
$Revision: 495211 $

Field Summary
 
Fields inherited from class org.apache.servicemix.components.util.PojoSupport
logger
 
Fields inherited from class org.apache.servicemix.jbi.management.BaseLifeCycle
currentState, INITIALIZED, listener
 
Fields inherited from interface javax.jbi.management.LifeCycleMBean
SHUTDOWN, STARTED, STOPPED, UNKNOWN
 
Constructor Summary
StreamWriterComponent()
           
 
Method Summary
 OutputStream getOut()
           
protected  void process(javax.jbi.messaging.MessageExchange exchange, javax.jbi.messaging.NormalizedMessage message)
          Process incoming exchange.
 void setOut(OutputStream out)
           
 
Methods inherited from class org.apache.servicemix.components.util.OutBinding
onMessageExchange, run, shutDown, start, stop
 
Methods inherited from class org.apache.servicemix.components.util.ComponentSupport
createComponentLifeCycle, createInOnlyExchange, createInOnlyExchange, createInOnlyExchange, createInOptionalOutExchange, createInOutExchange, createInOutExchange, createRobustInOnlyExchange, createServiceUnitManager, creatInOutExchange, forwardToExchange, forwardToExchange, getInMessage, getLifeCycle, getMessageTransformer, getServiceDescription, getServiceUnitManager, initializeServiceUnitManager, invoke, isExchangeWithConsumerOkay, isExchangeWithProviderOkay, propagateCorrelationId, resolveEndpointReference, setMessageTransformer
 
Methods inherited from class org.apache.servicemix.components.util.PojoSupport
answer, done, fail, fail, getBody, getContext, getDeliveryChannel, getDescription, getEndpoint, getExchangeFactory, getExtensionMBeanName, getService, init, init, isInAndOut, send, sendSync, sendSync, setBody, setEndpoint, setExtensionMBeanName, setService
 
Methods inherited from class org.apache.servicemix.jbi.management.BaseLifeCycle
firePropertyChanged, getAttributeInfos, getCurrentState, getName, getObjectToManage, getOperationInfos, getSubType, getType, isInitialized, isShutDown, isStarted, isStopped, isUnknown, setCurrentState, setPropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamWriterComponent

public StreamWriterComponent()
Method Detail

getOut

public OutputStream getOut()
Returns:
Returns the out.

setOut

public void setOut(OutputStream out)
Parameters:
out - The out to set.

process

protected void process(javax.jbi.messaging.MessageExchange exchange,
                       javax.jbi.messaging.NormalizedMessage message)
                throws Exception
Description copied from class: OutBinding
Process incoming exchange. The exchange is in the ACTIVE state. The method should end by a call to done() or answer(). When an exception is thrown, the fail() method will be called.

Specified by:
process in class OutBinding
Parameters:
exchange - the exchange to process
message - the input message of the exchange
Throws:
Exception - if an error occurs


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.