01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.cocoon.portal.event;
18:
19: /**
20: * <tt>Subscriber</tt> registers its interest in a class of events and
21: * filters the events of which it should be notified.
22: *
23: * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
24: * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
25: * @author Mauro Talevi
26: * @deprecated Use the {@link org.apache.cocoon.portal.event.Receiver} instead.
27: *
28: * @version CVS $Id: Subscriber.java 433543 2006-08-22 06:22:54Z crossley $
29: */
30: public interface Subscriber {
31:
32: /**
33: * Returns the event type of the event on which the Subscriber is interested.
34: * The event type is encoded by a <tt>Class</tt>.
35: *
36: * @return the <tt>Class</tt> encoding the event type
37: */
38: Class getEventType();
39:
40: /**
41: * Returns the filter used to select the events in which the subscriber is
42: * interested.
43: *
44: * @return the <tt>Filter</tt>
45: */
46: Filter getFilter();
47:
48: /**
49: * Callback method informing the Subscriber of the occurence of an event.
50: *
51: * @param event the <tt>Event</tt> of which the <tt>Subscriber</tt> is informed
52: */
53: void inform(Event event);
54: }
|