1 17 package org.apache.servicemix.client; 18 19 import java.util.Map ; 20 21 import javax.jbi.JBIException; 22 import javax.jbi.component.ComponentContext; 23 import javax.jbi.messaging.DeliveryChannel; 24 import javax.jbi.messaging.ExchangeStatus; 25 import javax.jbi.messaging.Fault; 26 import javax.jbi.messaging.InOnly; 27 import javax.jbi.messaging.InOptionalOut; 28 import javax.jbi.messaging.InOut; 29 import javax.jbi.messaging.MessageExchange; 30 import javax.jbi.messaging.MessageExchangeFactory; 31 import javax.jbi.messaging.MessagingException; 32 import javax.jbi.messaging.RobustInOnly; 33 import javax.xml.namespace.QName ; 34 35 import org.apache.servicemix.jbi.resolver.EndpointResolver; 36 37 44 public interface ServiceMixClient { 45 46 47 50 56 void send(MessageExchange exchange) throws MessagingException; 57 58 63 void send(Message message) throws MessagingException; 64 65 73 boolean sendSync(MessageExchange exchange) throws MessagingException; 74 75 85 boolean sendSync(MessageExchange exchange, long timeout) throws MessagingException; 86 87 93 MessageExchange receive() throws MessagingException; 94 95 102 MessageExchange receive(long timeout) throws MessagingException; 103 104 105 116 Object request(EndpointResolver resolver, Map exchangeProperties, Map inMessageProperties, Object content) throws JBIException; 117 118 128 void send(EndpointResolver resolver, Map exchangeProperties, Map inMessageProperties, Object content) throws JBIException; 129 130 142 boolean sendSync(EndpointResolver resolver, Map exchangeProperties, Map inMessageProperties, Object content) throws JBIException; 143 144 145 153 Object request(Map inMessageProperties, Object content) throws JBIException; 154 155 162 void send(Map inMessageProperties, Object content) throws JBIException; 163 164 173 boolean sendSync(Map inMessageProperties, Object content) throws JBIException; 174 175 176 177 180 186 InOnly createInOnlyExchange() throws MessagingException; 187 188 194 InOnly createInOnlyExchange(EndpointResolver resolver) throws JBIException; 195 196 202 InOut createInOutExchange() throws MessagingException; 203 204 210 InOut createInOutExchange(EndpointResolver resolver) throws JBIException; 211 212 218 InOptionalOut createInOptionalOutExchange() throws MessagingException; 219 220 226 InOptionalOut createInOptionalOutExchange(EndpointResolver resolver) throws JBIException; 227 228 234 RobustInOnly createRobustInOnlyExchange() throws MessagingException; 235 236 242 RobustInOnly createRobustInOnlyExchange(EndpointResolver resolver) throws JBIException; 243 244 245 246 249 255 EndpointResolver createResolverForService(QName service); 256 257 263 EndpointResolver createResolverInterface(QName interfaceName); 264 265 271 EndpointResolver createResolverForExternalService(QName service); 272 273 279 EndpointResolver createResolverForExternalInterface(QName interfaceName); 280 281 288 EndpointResolver createResolverForExternalInterface(QName service, String endpoint); 289 290 291 294 298 Destination createDestination(String uri) throws MessagingException; 299 300 301 304 305 313 void done(MessageExchange exchange) throws MessagingException; 314 315 318 void fail(MessageExchange exchange, Fault fault) throws MessagingException; 319 320 323 void fail(MessageExchange exchange, Exception error) throws MessagingException; 324 325 326 332 ComponentContext getContext(); 333 334 340 DeliveryChannel getDeliveryChannel() throws MessagingException; 341 342 348 MessageExchangeFactory getExchangeFactory() throws MessagingException; 349 350 351 356 void close() throws JBIException; 357 } 358 | Popular Tags |