com.bea.wsrp.model.markup
Interface IEventManipulator

All Known Subinterfaces:
IBlockingInteractionBaseResponseContext, IBlockingInteractionResponseContext, IHandleEventsRequestContext, IHandleEventsResponseContext, IInteractionResponseContext

public interface IEventManipulator

A request context that represents input data for the "handleEvents" operation.

This interface is intended to be implemented only by Oracle Weblogic Portal. Oracle Systems reserves the right to add abstract methods to this interface without notice. Implementations of this interface by other parties must not be expected to compile without change in future versions of Oracle Weblogic Portal.

Method Summary
 IEventContext createEventContext(QName qname)
          Create a new EventContext for an event with the specified QName.
 IEventContext getEventContext(Event event)
          Gets an EventContext object representing the supplied Event, to allow manipulation of the Event's payload, payload encoding or source portlet information.
 List<IEventContext> getEventContexts()
          Returns a list of IEventContext objects representing the events in this interceptor context.
 int getEventCount()
          Returns the number of events in this batch of events.
 List<Event> getEvents()
          Returns a list of Events associated with this interceptor context- being sent to the producer on a RequestContext or received from the producer on a ResponseContext.
 void setEventContexts(List<IEventContext> events)
          Sets the supplied list of EventContext objects as the events for this interceptor context.
 void setEvents(List<Event> events)
          Sets the supplied list of events as events of the current portlet.
 

Method Detail

getEventContexts

List<IEventContext> getEventContexts()
Returns a list of IEventContext objects representing the events in this interceptor context. The IEventContext objects can be used to manipulate the payload, payload encoding, and source portlet information before the events are sent to the producer or distributed on the consumer.

The returned list is modifiable, but is a copy of the list held interally by the interceptor context, so modifications made to the list will not affect the interceptor context. To set a new list of events for use in the interceptor context, use the setEventContexts method.

Returns
a list of EventContext objects.

setEventContexts

void setEventContexts(List<IEventContext> events)
Sets the supplied list of EventContext objects as the events for this interceptor context.

Parameters
events - a list of EventContext objects

getEventContext

IEventContext getEventContext(Event event)
Gets an EventContext object representing the supplied Event, to allow manipulation of the Event's payload, payload encoding or source portlet information.

Parameters
event - the Event to create an EventContext object for.
Returns
an IEventContext representing the specified event, or null if the specified event cannot be sent over WSRP.

createEventContext

IEventContext createEventContext(QName qname)
Create a new EventContext for an event with the specified QName.

Parameters
qname - the QName of the event to create an EventContext for.
Returns
a new IEventContext for an event with the specified QName, or null if the specified QName is null, or is a reserved QName for an event type which cannot be sent over WSRP. The returned event will have no payload and no payload origin; see the documentation on com.bea.wsrp..model.markup.IEventContext for more information.

getEvents

List<Event> getEvents()
Returns a list of Events associated with this interceptor context- being sent to the producer on a RequestContext or received from the producer on a ResponseContext. The returned list is modifiable, but is a copy of the list held interally by the interceptor context, so modifications made to the list will not affect the interceptor context. To set a new list of events for use in the context, use the setEvents method.

To manipulate an event (change name, payload, payload encoding, etc.) prior to calling setEvents(), use the IEventContext class.

Returns
a list of events
See Also
IEventContext

setEvents

void setEvents(List<Event> events)
Sets the supplied list of events as events of the current portlet.

Parameters
events - a list of events.
See Also
IEventContext

getEventCount

int getEventCount()
Returns the number of events in this batch of events.

Returns
the number of events currently in this interceptor context.


Copyright © 2011, Oracle. All rights reserved.