001 /**
002 *
003 * Copyright 2004 Protique Ltd
004 *
005 * Licensed under the Apache License, Version 2.0 (the "License");
006 * you may not use this file except in compliance with the License.
007 * 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 **/
018 package org.activemq.transport;
019
020 import org.activemq.io.WireFormat;
021
022 import javax.jms.JMSException;
023 import java.net.URI;
024
025 /**
026 * TransportChannelFactory for creating TransportChannels
027 *
028 * @version $Revision: 1.1.1.1 $
029 */
030 public interface TransportChannelFactory {
031 /**
032 * Create a Channel to a remote Node - e.g. a Broker
033 *
034 * @param wireFormat
035 * @param remoteLocation
036 * @return the TransportChannel bound to the remote node
037 * @throws JMSException
038 */
039 public TransportChannel create(WireFormat wireFormat, URI remoteLocation) throws JMSException;
040
041 /**
042 * Create a Channel to a remote Node - e.g. a Broker
043 *
044 * @param wireFormat
045 * @param remoteLocation
046 * @param localLocation -
047 * e.g. local InetAddress and local port
048 * @return the TransportChannel bound to the remote node
049 * @throws JMSException
050 */
051 public TransportChannel create(WireFormat wireFormat, URI remoteLocation, URI localLocation) throws JMSException;
052
053 /**
054 * Does this channel require an embedded broker to perform
055 * such as VM or multicast based transports
056 *
057 * @return true if an embedded broker is a requirement
058 * of using the channel
059 */
060 public boolean requiresEmbeddedBroker();
061 }