01: /*_############################################################################
02: _##
03: _## SNMP4J - TableListener.java
04: _##
05: _## Copyright (C) 2003-2008 Frank Fock and Jochen Katz (SNMP4J.org)
06: _##
07: _## Licensed under the Apache License, Version 2.0 (the "License");
08: _## you may not use this file except in compliance with the License.
09: _## 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;
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 {
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: }
|