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.activemq.transport;
018    
019    import java.net.InetSocketAddress;
020    import java.net.URI;
021    
022    import org.apache.activemq.command.BrokerInfo;
023    
024    public class TransportServerFilter implements TransportServer {
025    
026        protected final TransportServer next;
027    
028        /**
029         * @param next
030         */
031        public TransportServerFilter(TransportServer next) {
032            this.next = next;
033        }
034    
035        public URI getConnectURI() {
036            return next.getConnectURI();
037        }
038    
039        public void setAcceptListener(TransportAcceptListener acceptListener) {
040            next.setAcceptListener(acceptListener);
041        }
042    
043        public void setBrokerInfo(BrokerInfo brokerInfo) {
044            next.setBrokerInfo(brokerInfo);
045        }
046    
047        public void start() throws Exception {
048            next.start();
049        }
050    
051        public void stop() throws Exception {
052            next.stop();
053        }
054    
055        public InetSocketAddress getSocketAddress() {
056            return next.getSocketAddress();
057        }
058    
059        public boolean isSslServer() {
060            return next.isSslServer();
061        }
062    }