001/**
002 *
003 * Copyright the original author or authors
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 */
017package org.jivesoftware.smackx.bytestreams.socks5;
018
019import org.jivesoftware.smackx.bytestreams.BytestreamListener;
020import org.jivesoftware.smackx.bytestreams.BytestreamRequest;
021
022/**
023 * Socks5BytestreamListener are informed if a remote user wants to initiate a SOCKS5 Bytestream.
024 * Implement this interface to handle incoming SOCKS5 Bytestream requests.
025 * <p>
026 * There are two ways to add this listener. See
027 * {@link Socks5BytestreamManager#addIncomingBytestreamListener(BytestreamListener)} and
028 * {@link Socks5BytestreamManager#addIncomingBytestreamListener(BytestreamListener, org.jxmpp.jid.Jid)} for
029 * further details.
030 *
031 * @author Henning Staib
032 */
033public abstract class Socks5BytestreamListener implements BytestreamListener {
034
035    @Override
036    public void incomingBytestreamRequest(BytestreamRequest request) {
037        incomingBytestreamRequest((Socks5BytestreamRequest) request);
038    }
039
040    /**
041     * This listener is notified if a SOCKS5 Bytestream request from another user has been received.
042     *
043     * @param request the incoming SOCKS5 Bytestream request
044     */
045    public abstract void incomingBytestreamRequest(Socks5BytestreamRequest request);
046
047}