org.apache.wicket
Class RequestListenerInterface

java.lang.Object
  extended by org.apache.wicket.RequestListenerInterface

public class RequestListenerInterface
extends Object

Base class for request listener interfaces.

Author:
Jonathan Locke

Constructor Summary
RequestListenerInterface(Class<? extends IRequestListener> listenerInterfaceClass)
          Constructor that creates listener interfaces which record the page version.
RequestListenerInterface(Class<? extends IRequestListener> listenerInterfaceClass, boolean recordsPageVersion)
          Constructor.
 
Method Summary
static RequestListenerInterface forName(String interfaceName)
          Looks up a request interface listener by name.
 Method getMethod()
           
 String getName()
           
 boolean getRecordsPageVersion()
           
 void invoke(Page page, Component component)
          Invokes a given interface on a component.
 IRequestTarget newRequestTarget(Page page, Component component, RequestListenerInterface listener, RequestParameters requestParameters)
          Creates a new request target for this request listener interface
 void register()
          Method to call to register this interface for use
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequestListenerInterface

public RequestListenerInterface(Class<? extends IRequestListener> listenerInterfaceClass)
Constructor that creates listener interfaces which record the page version.

Parameters:
listenerInterfaceClass - The interface class, which must extend IRequestListener.

RequestListenerInterface

public RequestListenerInterface(Class<? extends IRequestListener> listenerInterfaceClass,
                                boolean recordsPageVersion)
Constructor.

Parameters:
listenerInterfaceClass - The interface class, which must extend IRequestListener.
recordsPageVersion - Whether or not urls encoded for this interface contain the page version. If set to false the latest page version is always used.
Method Detail

forName

public static final RequestListenerInterface forName(String interfaceName)
Looks up a request interface listener by name.

Parameters:
interfaceName - The interface name
Returns:
The RequestListenerInterface object, or null if none is found

getMethod

public final Method getMethod()
Returns:
The method for this request listener interface

getName

public final String getName()
Returns:
The name of this request listener interface

getRecordsPageVersion

public final boolean getRecordsPageVersion()
Returns:
true if urls encoded for this interface should record the page version, false if they should always be encoded for the latest page version

invoke

public final void invoke(Page page,
                         Component component)
Invokes a given interface on a component.

Parameters:
page - The Page that contains the component
component - The component

newRequestTarget

public IRequestTarget newRequestTarget(Page page,
                                       Component component,
                                       RequestListenerInterface listener,
                                       RequestParameters requestParameters)
Creates a new request target for this request listener interface

Parameters:
page - The page
component - The component
listener - The listener to call
requestParameters - Request parameters
Returns:
The request target

register

public void register()
Method to call to register this interface for use


toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


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