All Packages Class Hierarchy This Package Previous Next Index
Class examples.mo.SimpleEvent.Simple
java.lang.Object
|
+----examples.mo.SimpleEvent.Simple
- public class Simple
- extends Object
- implements Serializable
Simple definition of a m-bean.
The m-bean shows how to:
- Implement events in an m-bean.
- Emmit events of type SimpleEvent each time the "State" property is modified.
- Register SimpleListener listener with the m-bean to receive events.
The object has three properties:
- "State" a read/write property.
- "ClassVersion" a read only property that keeps the version of this implementation.
- "NbChanges" a read only property.
- See Also:
- SimpleEvent, SimpleListener
-
Simple()
-
-
addSimpleListener(SimpleListener)
- Register a listener for receiving
SimpleEvents events.
-
getClassVersion()
- Getter for the "ClassVersion" property.
-
getNbChanges()
- Getter for the "NbChanges" property.The method
is compliant with the Bean design pattern.
-
getState()
- Getter for the "State" property.
-
removeSimpleListener(SimpleListener)
- Remove a listener.
-
setState(String)
- Getter for the "State" property.
Simple
public Simple()
getClassVersion
public String getClassVersion()
- Getter for the "ClassVersion" property. The method
is compliant with the Bean design pattern.
- Returns:
- the current value of the "tClassVersion" property
getState
public String getState()
- Getter for the "State" property. The method
is compliant with the Bean design pattern.
- Returns:
- the current value of the "State" property.
setState
public void setState(String s)
- Getter for the "State" property. The method
is compliant with the Bean design pattern.
Each time the method is called, a
SimpleEvent
will be sent to all the listeners that implements the
SimpleListener
interface and which is at the time registered with the m-bean.
- Returns:
- the current value of the "State" property.
getNbChanges
public Integer getNbChanges()
- Getter for the "NbChanges" property.The method
is compliant with the Bean design pattern.
- Returns:
- the current value of the "NbChanges" property.
addSimpleListener
public synchronized void addSimpleListener(SimpleListener x)
- Register a listener for receiving
SimpleEvents events.
The method is compliant with the Bean design pattern.
- Parameters:
- x - the listener to add.
removeSimpleListener
public synchronized void removeSimpleListener(SimpleListener x)
- Remove a listener.
- Parameters:
- x - the listener to remove.
All Packages Class Hierarchy This Package Previous Next Index