001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements. See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License. You may obtain a copy of the License at
008 *
009 * http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017 package org.apache.servicemix.client;
018
019 import javax.jbi.messaging.InOnly;
020 import javax.jbi.messaging.InOptionalOut;
021 import javax.jbi.messaging.InOut;
022 import javax.jbi.messaging.MessagingException;
023 import javax.jbi.messaging.RobustInOnly;
024
025 /**
026 * Represents a JBI endpoint you can communicate with
027 *
028 * @version $Revision: $
029 */
030 public interface Destination extends org.apache.servicemix.jbi.api.Destination {
031
032 /**
033 * Creates an {@link InOnly} (one way) message exchange.
034 *
035 * @return the newly created message exchange
036 * @throws MessagingException
037 */
038 InOnly createInOnlyExchange() throws MessagingException;
039
040 /**
041 * Creates an {@link InOut} (request-reply) message exchange.
042 *
043 * @return the newly created message exchange
044 * @throws MessagingException
045 */
046 InOut createInOutExchange() throws MessagingException;
047
048 /**
049 * Creates an {@link InOptionalOut} (optional request-reply) message
050 * exchange.
051 *
052 * @return the newly created message exchange
053 * @throws MessagingException
054 */
055 InOptionalOut createInOptionalOutExchange() throws MessagingException;
056
057 /**
058 * Creates an {@link RobustInOnly} (one way) message exchange.
059 *
060 * @return the newly created message exchange
061 * @throws MessagingException
062 */
063 RobustInOnly createRobustInOnlyExchange() throws MessagingException;
064
065 /**
066 * Allows a Message to be created for an {@link InOnly} exchange for simpler one-way messaging.
067 * @throws MessagingException
068 */
069 Message createInOnlyMessage() throws MessagingException;
070
071 }