Title: [1026] trunk/core/src/main/java/org/servicemix/components/util/PojoSupport.java: Added sendSync methods and removed unnecessary dependency of MessageExchangeImpl
- Revision
- 1026
- Author
- gastaldi
- Date
- 2005-12-06 15:14:27 -0500 (Tue, 06 Dec 2005)
Log Message
Added sendSync methods and removed unnecessary dependency of MessageExchangeImpl
Modified Paths
Diff
Modified: trunk/core/src/main/java/org/servicemix/components/util/PojoSupport.java (1025 => 1026)
--- trunk/core/src/main/java/org/servicemix/components/util/PojoSupport.java 2005-12-06 17:22:05 UTC (rev 1025)
+++ trunk/core/src/main/java/org/servicemix/components/util/PojoSupport.java 2005-12-06 20:14:27 UTC (rev 1026)
@@ -24,7 +24,6 @@
import org.servicemix.jbi.NotInitialisedYetException;
import org.servicemix.jbi.management.BaseLifeCycle;
import org.servicemix.jbi.messaging.Marshaler;
-import org.servicemix.jbi.messaging.MessageExchangeImpl;
import org.servicemix.jbi.messaging.NormalizedMessageImpl;
import javax.jbi.JBIException;
@@ -214,6 +213,14 @@
getDeliveryChannel().send(exchange);
}
+ public boolean sendSync(MessageExchange exchange) throws MessagingException {
+ return getDeliveryChannel().sendSync(exchange);
+ }
+
+ public boolean sendSync(MessageExchange exchange, long timeMillis) throws MessagingException {
+ return getDeliveryChannel().sendSync(exchange, timeMillis);
+ }
+
/**
* A helper method to indicate that the message exchange should be
* continued with the given response and send the message
@@ -223,7 +230,7 @@
* @throws MessagingException
*/
public void answer(MessageExchange exchange, NormalizedMessage answer) throws MessagingException {
- exchange.setMessage(answer, MessageExchangeImpl.OUT);
+ exchange.setMessage(answer, "out");
getDeliveryChannel().send(exchange);
}