Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter
11g Release 1 (11.1.1.4.0)
E15995-03


oracle.adf.view.page.editor.event
Class EventHandler

java.lang.Object
  extended by oracle.adf.view.page.editor.event.EventHandler

All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class EventHandler
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable

Models an event handler that is registered in Oracle Composer extension file.

Since:
11.1.1.0.1BETA
See Also:
Serialized Form

Constructor Summary
EventHandler(Event event, java.lang.String className)
          Creates an event handler with the given event type and implementing class name.

 

Method Summary
 int compareTo(java.lang.Object o)
          Compare the sequence number of two event handlers.
 PageEditorListener getClassInstance()
          Returns an instance of the event listener that is configured to handle this event.
 java.lang.String getClassName()
          Returns the class name of this event handler's implementation.
 Event getEvent()
          Returns the event with which this event hander is associated.
 int getSequence()
          Returns the sequence number of this event handler.
 void setSequence(int sequence)
          Set the sequence number of this event handler.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

EventHandler

public EventHandler(Event event,
                    java.lang.String className)
Creates an event handler with the given event type and implementing class name.
Parameters:
event - Event for which to invoke this handler.
className - name of the class that implements the event handler.
Throws:
java.lang.NullPointerException - If either event or className is null.

Method Detail

getEvent

public Event getEvent()
Returns the event with which this event hander is associated.
Returns:
Event object with which this handler is associated.

getClassName

public java.lang.String getClassName()
Returns the class name of this event handler's implementation.
Returns:
Fully qualified class name of this event handler's implementation.

getSequence

public int getSequence()
Returns the sequence number of this event handler.
Returns:
sequence number of this event handler

setSequence

public void setSequence(int sequence)
Set the sequence number of this event handler.
Parameters:
sequence - sequence number of this event handler

compareTo

public int compareTo(java.lang.Object o)
Compare the sequence number of two event handlers. This implements the "Sortable" interface. Note: this class has a natural ordering that is inconsistent with equals.
Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - another EventHandler object
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object
Throws:
java.lang.ClassCastException - if o is not a EventHandler

getClassInstance

public PageEditorListener getClassInstance()
                                    throws java.lang.Exception
Returns an instance of the event listener that is configured to handle this event.
Returns:
An instance of PageEditorListner that is registered to handle this event.
Throws:
java.lang.Exception - If the class name given by className specified while creating this event handler cannot be located, initialised or instantiated. Exception is also thrown if the class does not implement PageEditorListener interface.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle WebCenter
11g Release 1 (11.1.1.4.0)
E15995-03


Copyright © 2009, 2011, Oracle and/or its affiliates. All rights reserved.