01: /* $Id: PortletEvent.java,v 1.3 2006/08/03 09:58:04 dg154973 Exp $
02: * Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.
03: * Use is subject to license terms.
04: */
05: package com.sun.portal.portletappengine.ipc;
06:
07: import java.io.Serializable;
08: import java.io.OutputStream;
09:
10: /**
11: * This interface is implemented and an instance is returned in response to
12: * createEvent call on PortletEventBroker. This interface allows two ways of
13: * setting the event data on PortletEvent (1) using setEventData() method or
14: * (2) by obtaining the OutputStream using getEventStream() call and then
15: * writing the event data to the stream.
16: * <p/>
17: * This interface also contains methods to obtain the event name and to fire.
18: */
19: public interface PortletEvent {
20:
21: /**
22: * The event name that will be sent to all the pariticipating portlets in case of failure.
23: */
24: public static final String EVENT_HANDLING_FAILED = "eventHandlingFailed";
25:
26: /**
27: * @return A String containing the event name
28: */
29: public String getEventName();
30:
31: /**
32: * @return An OutputSteam object to which the event data can be written.
33: */
34: public OutputStream getEventStream();
35:
36: /**
37: * @param s A Serializable object containing the event data.
38: */
39: public void setEventData(Serializable s);
40:
41: /**
42: * As the name indicates method for event to fire itself.
43: */
44: public void fire();
45: }
|