KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > snmp4j > util > TableListener


1 /*_############################################################################
2   _##
3   _## SNMP4J - TableListener.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 package org.snmp4j.util;
22
23 import java.util.EventListener JavaDoc;
24
25 /**
26  * The <code>TableListener</code> interface is implemented by objects
27  * listening for table events. Table events typically contain row data.
28  *
29  * @author Frank Fock
30  * @version 1.0.2
31  * @since 1.0.2
32  * @see TableUtils
33  */

34 public interface TableListener extends EventListener JavaDoc {
35
36   /**
37    * Consumes the next table event, which is typically the next row in a
38    * table retrieval operation.
39    *
40    * @param event
41    * a <code>TableEvent</code> instance.
42    * @return
43    * <code>true</code> if this listener wants to receive more events,
44    * otherwise return <code>false</code>. For example, a
45    * <code>TableListener</code> can return <code>false</code> to stop
46    * table retrieval.
47    */

48   boolean next(TableEvent event);
49
50   /**
51    * Indicates in a series of table events that no more events will follow.
52    * @param event
53    * a <code>TableEvent</code> instance that will either indicate an error
54    * ({@link TableEvent#isError()} returns <code>true</code>) or success
55    * of the table operation.
56    */

57   void finished(TableEvent event);
58
59 }
60
Popular Tags