blob: be78255d50d11b5e0e59ef88429f4bd6f8987d87 [file] [log] [blame]
Shuyi Chend7955ce2013-05-22 14:51:55 -07001/**
2 * All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
3 * you may not use this file except in compliance with the License.
4 * You may obtain a copy of the License at
5 *
6 * http://www.apache.org/licenses/LICENSE-2.0
7 *
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */
14package org.jivesoftware.smackx.bytestreams;
15
16import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamListener;
17import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager;
18import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamListener;
19import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamManager;
20
21/**
22 * BytestreamListener are notified if a remote user wants to initiate a bytestream. Implement this
23 * interface to handle incoming bytestream requests.
24 * <p>
25 * BytestreamListener can be registered at the {@link Socks5BytestreamManager} or the
26 * {@link InBandBytestreamManager}.
27 * <p>
28 * There are two ways to add this listener. See
29 * {@link BytestreamManager#addIncomingBytestreamListener(BytestreamListener)} and
30 * {@link BytestreamManager#addIncomingBytestreamListener(BytestreamListener, String)} for further
31 * details.
32 * <p>
33 * {@link Socks5BytestreamListener} or {@link InBandBytestreamListener} provide a more specific
34 * interface of the BytestreamListener.
35 *
36 * @author Henning Staib
37 */
38public interface BytestreamListener {
39
40 /**
41 * This listener is notified if a bytestream request from another user has been received.
42 *
43 * @param request the incoming bytestream request
44 */
45 public void incomingBytestreamRequest(BytestreamRequest request);
46
47}