org.apache.wicket
Class RequestListenerInterface

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

public class RequestListenerInterface
extends java.lang.Object

Base class for request listener interfaces.

Author:
Jonathan Locke

Constructor Summary
RequestListenerInterface(java.lang.Class<? extends IRequestListener> listenerInterfaceClass)
          Constructor.
 
Method Summary
static RequestListenerInterface forName(java.lang.String interfaceName)
          Looks up a request interface listener by name.
 java.lang.Class<? extends IRequestListener> getListenerInterfaceClass()
           
 java.lang.reflect.Method getMethod()
           
 java.lang.String getName()
           
static java.util.Collection<RequestListenerInterface> getRegisteredInterfaces()
           
 void invoke(IRequestableComponent rcomponent)
          Invokes a given interface on a component.
 void invoke(IRequestableComponent rcomponent, Behavior behavior)
          Invokes a given interface on a component's behavior.
 boolean isIncludeRenderCount()
           
 boolean isRenderPageAfterInvocation()
           
 void register()
          Method to call to register this interface for use
 RequestListenerInterface setIncludeRenderCount(boolean includeRenderCount)
           
 RequestListenerInterface setRenderPageAfterInvocation(boolean renderPageAfterInvocation)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequestListenerInterface

public RequestListenerInterface(java.lang.Class<? extends IRequestListener> listenerInterfaceClass)
Constructor.

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

forName

public static final RequestListenerInterface forName(java.lang.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

getListenerInterfaceClass

public java.lang.Class<? extends IRequestListener> getListenerInterfaceClass()
Returns:
The interface class, which must extend IRequestListener.

setIncludeRenderCount

public RequestListenerInterface setIncludeRenderCount(boolean includeRenderCount)
Parameters:
includeRenderCount -
Returns:
self

isIncludeRenderCount

public boolean isIncludeRenderCount()
Returns:
whether the render count should be included in url

setRenderPageAfterInvocation

public RequestListenerInterface setRenderPageAfterInvocation(boolean renderPageAfterInvocation)
Parameters:
renderPageAfterInvocation -
Returns:
self

isRenderPageAfterInvocation

public boolean isRenderPageAfterInvocation()
Returns:
whether the page should be rendered after invocation of this interface (during non-ajax requests)

getMethod

public final java.lang.reflect.Method getMethod()
Returns:
The method for this request listener interface

getName

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

invoke

public final void invoke(IRequestableComponent rcomponent)
Invokes a given interface on a component.

Parameters:
rcomponent - The component
Throws:
ListenerInvocationNotAllowedException - when listener invocation attempted on a component that does not allow it

invoke

public final void invoke(IRequestableComponent rcomponent,
                         Behavior behavior)
Invokes a given interface on a component's behavior.

Parameters:
rcomponent - The component
behavior -
Throws:
ListenerInvocationNotAllowedException - when listener invocation attempted on a component that does not allow it

register

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


toString

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

getRegisteredInterfaces

public static java.util.Collection<RequestListenerInterface> getRegisteredInterfaces()
Returns:
collection of all registered interfaces


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