001    /**
002     * 
003     * Copyright 2005 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    
019    package org.activemq.transport.stomp;
020    
021    import EDU.oswego.cs.dl.util.concurrent.Executor;
022    import org.activemq.transport.tcp.TcpTransportChannel;
023    import org.activemq.transport.tcp.TcpTransportServerChannel;
024    
025    import javax.jms.JMSException;
026    import java.net.Socket;
027    import java.net.URI;
028    
029    /**
030     * A transport for using Stomp to talk to ActiveMQ
031     *
032     * @version $Revision: 1.1 $
033     */
034    public class StompTransportChannel extends TcpTransportChannel {
035    
036        public StompTransportChannel() {
037            super(new StompWireFormat());
038        }
039    
040        public StompTransportChannel(URI remoteLocation) throws JMSException {
041            super(new StompWireFormat(), remoteLocation);
042        }
043    
044        public StompTransportChannel(URI remoteLocation, URI localLocation) throws JMSException {
045            super(new StompWireFormat(), remoteLocation, localLocation);
046        }
047    
048        public StompTransportChannel(TcpTransportServerChannel serverChannel, Socket socket, Executor executor)
049                throws JMSException {
050            super(serverChannel, new StompWireFormat(), socket, executor);
051        }
052    
053        public StompTransportChannel(Socket socket, Executor executor) throws JMSException {
054            super(new StompWireFormat(), socket, executor);
055        }
056    
057        public StompWireFormat getTTMPWireFormat() {
058            return (StompWireFormat) getWireFormat();
059        }
060    }