Class EventRequestWrapper

  • All Implemented Interfaces:
    EventRequest, PortletRequest

    public class EventRequestWrapper
    extends PortletRequestWrapper
    implements EventRequest
    The EventRequestWrapper provides a convenient implementation of the EventRequest interface that can be subclassed by developers wishing to adapt the request. This class implements the Wrapper or Decorator pattern. Methods default to calling through to the wrapped request object.
    Since:
    2.0
    See Also:
    EventRequest
    • Constructor Detail

      • EventRequestWrapper

        public EventRequestWrapper​(EventRequest request)
        Creates an EventRequest adaptor wrapping the given request object.
        Parameters:
        request - the event request to wrap
        Throws:
        java.lang.IllegalArgumentException - if the request is null
    • Method Detail

      • setRequest

        public void setRequest​(EventRequest request)
        Sets the request object being wrapped.
        Parameters:
        request - the request to set
        Throws:
        java.lang.IllegalArgumentException - if the request is null.
      • getEvent

        public Event getEvent()
        The default behavior of this method is to call getEvent() on the wrapped request object.
        Specified by:
        getEvent in interface EventRequest
        Returns:
        the event that triggered the current processEvent call.
      • getMethod

        public java.lang.String getMethod()
        The default behavior of this method is to call getMethod() on the wrapped request object.
        Specified by:
        getMethod in interface EventRequest
        Returns:
        a String specifying the name of the HTTP method with which this request was made