KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > snmp4j > transport > TransportListener


1 /*_############################################################################
2   _##
3   _## SNMP4J - TransportListener.java
4   _##
5   _## Copyright 2003-2007 Frank Fock and Jochen Katz (SNMP4J.org)
6   _##
7   _## Licensed under the Apache License, Version 2.0 (the "License");
8   _## you may not use this file except in compliance with the License.
9   _## You may obtain a copy of the License at
10   _##
11   _## http://www.apache.org/licenses/LICENSE-2.0
12   _##
13   _## Unless required by applicable law or agreed to in writing, software
14   _## distributed under the License is distributed on an "AS IS" BASIS,
15   _## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   _## See the License for the specific language governing permissions and
17   _## limitations under the License.
18   _##
19   _##########################################################################*/

20
21
22
23 package org.snmp4j.transport;
24
25 import org.snmp4j.smi.Address;
26 import org.snmp4j.TransportMapping;
27 import java.nio.ByteBuffer JavaDoc;
28 // JavaDoc import
29
import org.snmp4j.MessageDispatcher;
30
31 /**
32  * The <code>TransportListener</code> interface is implemented by objects
33  * that process incoming messages from <code>TransportMapping</code>s, for
34  * example {@link MessageDispatcher}.
35  *
36  * @author Frank Fock
37  * @version 1.6
38  * @since 1.6
39  */

40 public interface TransportListener {
41
42   /**
43    * Processes an incoming message.
44    * @param sourceTransport
45    * a <code>TransportMapping</code> instance denoting the transport that
46    * received the message and that will be used to send any responses to
47    * this message. The <code>sourceTransport</code> has to support the
48    * <code>incomingAddress</code>'s implementation class.
49    * @param incomingAddress
50    * the <code>Address</code> from which the message has been received.
51    * @param wholeMessage
52    * an <code>ByteBuffer</code> containing the received message.
53    * @since 1.6
54    */

55   void processMessage(TransportMapping sourceTransport,
56                       Address incomingAddress,
57                       ByteBuffer JavaDoc wholeMessage);
58 }
59
Popular Tags