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