Shuyi Chen | d7955ce | 2013-05-22 14:51:55 -0700 | [diff] [blame] | 1 | /**
|
| 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 | */
|
| 14 | package org.jivesoftware.smackx.bytestreams.ibb;
|
| 15 |
|
| 16 | import org.jivesoftware.smackx.bytestreams.BytestreamListener;
|
| 17 | import org.jivesoftware.smackx.bytestreams.BytestreamRequest;
|
| 18 |
|
| 19 | /**
|
| 20 | * InBandBytestreamListener are informed if a remote user wants to initiate an In-Band Bytestream.
|
| 21 | * Implement this interface to handle incoming In-Band Bytestream requests.
|
| 22 | * <p>
|
| 23 | * There are two ways to add this listener. See
|
| 24 | * {@link InBandBytestreamManager#addIncomingBytestreamListener(BytestreamListener)} and
|
| 25 | * {@link InBandBytestreamManager#addIncomingBytestreamListener(BytestreamListener, String)} for
|
| 26 | * further details.
|
| 27 | *
|
| 28 | * @author Henning Staib
|
| 29 | */
|
| 30 | public abstract class InBandBytestreamListener implements BytestreamListener {
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 | public void incomingBytestreamRequest(BytestreamRequest request) {
|
| 35 | incomingBytestreamRequest((InBandBytestreamRequest) request);
|
| 36 | }
|
| 37 |
|
| 38 | /**
|
| 39 | * This listener is notified if an In-Band Bytestream request from another user has been
|
| 40 | * received.
|
| 41 | *
|
| 42 | * @param request the incoming In-Band Bytestream request
|
| 43 | */
|
| 44 | public abstract void incomingBytestreamRequest(InBandBytestreamRequest request);
|
| 45 |
|
| 46 | }
|