org.apache.pluto.core
Class NullPortlet

java.lang.Object
  extended by org.apache.pluto.core.NullPortlet
All Implemented Interfaces:
EventPortlet, Portlet, ResourceServingPortlet

public class NullPortlet
extends Object
implements EventPortlet, ResourceServingPortlet, Portlet


Constructor Summary
NullPortlet()
           
 
Method Summary
 void destroy()
          Called by the portlet container to indicate to a portlet that the portlet is being taken out of service.
 void init(PortletConfig arg0)
          Called by the portlet container to indicate to a portlet that the portlet is being placed into service.
 void processAction(ActionRequest arg0, ActionResponse arg1)
          Called by the portlet container to allow the portlet to process an action request.
 void processEvent(EventRequest arg0, EventResponse arg1)
          Called by the portlet container requesting the portlet to process a specific event.
 void render(RenderRequest arg0, RenderResponse arg1)
          Called by the portlet container to allow the portlet to generate the content of the response based on its current state.
 void serveResource(ResourceRequest arg0, ResourceResponse arg1)
          Called by the portlet container to allow the portlet to generate the resource content based on its current state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullPortlet

public NullPortlet()
Method Detail

processEvent

public void processEvent(EventRequest arg0,
                         EventResponse arg1)
                  throws PortletException,
                         IOException
Description copied from interface: EventPortlet
Called by the portlet container requesting the portlet to process a specific event.

Specified by:
processEvent in interface EventPortlet
Parameters:
arg0 - the event request
arg1 - the event response
Throws:
PortletException - if the portlet has problems fulfilling the request
UnavailableException - if the portlet is unavailable to process the event at this time
PortletSecurityException - if the portlet cannot fullfill this request because of security reasons
IOException - if the streaming causes an I/O problem

serveResource

public void serveResource(ResourceRequest arg0,
                          ResourceResponse arg1)
                   throws PortletException,
                          IOException
Description copied from interface: ResourceServingPortlet
Called by the portlet container to allow the portlet to generate the resource content based on its current state. The portal / portlet container must not render any output in addition to the content returned by the portlet. The portal / portlet container should expect that the portlet may return binary content for a renderResource call.

Specified by:
serveResource in interface ResourceServingPortlet
Parameters:
arg0 - the resource request
arg1 - the resource response
Throws:
PortletException - if the portlet has problems fulfilling the rendering request
UnavailableException - if the portlet is unavailable to perform render at this time
PortletSecurityException - if the portlet cannot fullfill this request because of security reasons
IOException - if the streaming causes an I/O problem

destroy

public void destroy()
Description copied from interface: Portlet
Called by the portlet container to indicate to a portlet that the portlet is being taken out of service.

Before the portlet container calls the destroy method, it should allow any threads that are currently processing requests within the portlet object to complete execution. To avoid waiting forever, the portlet container can optionally wait for a predefined time before destroying the portlet object.

This method enables the portlet to do the following:

Specified by:
destroy in interface Portlet

init

public void init(PortletConfig arg0)
          throws PortletException
Description copied from interface: Portlet
Called by the portlet container to indicate to a portlet that the portlet is being placed into service.

The portlet container calls the init method exactly once after instantiating the portlet. The init method must complete successfully before the portlet can receive any requests.

The portlet container cannot place the portlet into service if the init method

  1. Throws a PortletException
  2. Does not return within a time period defined by the portlet container.

Specified by:
init in interface Portlet
Parameters:
arg0 - a PortletConfig object containing the portlet's configuration and initialization parameters
Throws:
PortletException - if an exception has occurred that interferes with the portlet's normal operation.
UnavailableException - if the portlet cannot perform the initialization at this time.

processAction

public void processAction(ActionRequest arg0,
                          ActionResponse arg1)
                   throws PortletException,
                          IOException
Description copied from interface: Portlet
Called by the portlet container to allow the portlet to process an action request. This method is called if the client request was originated by a URL created (by the portlet) with the RenderResponse.createActionURL() method.

Typically, in response to an action request, a portlet updates state based on the information sent in the action request parameters. In an action the portlet may:

A client request triggered by an action URL translates into one action request and many render requests, one per portlet in the portal page. The action processing must be finished before the render requests can be issued.

Specified by:
processAction in interface Portlet
Parameters:
arg0 - the action request
arg1 - the action response
Throws:
PortletException - if the portlet has problems fulfilling the request
UnavailableException - if the portlet is unavailable to process the action at this time
PortletSecurityException - if the portlet cannot fullfill this request because of security reasons
IOException - if the streaming causes an I/O problem

render

public void render(RenderRequest arg0,
                   RenderResponse arg1)
            throws PortletException,
                   IOException
Description copied from interface: Portlet
Called by the portlet container to allow the portlet to generate the content of the response based on its current state.

Specified by:
render in interface Portlet
Parameters:
arg0 - the render request
arg1 - the render response
Throws:
PortletException - if the portlet has problems fulfilling the rendering request
UnavailableException - if the portlet is unavailable to perform render at this time
PortletSecurityException - if the portlet cannot fullfill this request because of security reasons
IOException - if the streaming causes an I/O problem


Copyright © 2003-2011 Apache Software Foundation. All Rights Reserved.