Class MdFactoryEvent
- All Implemented Interfaces:
Serializable,Cloneable
One event will be fired for each request to the server. Instead of multiple events fired for each individual object, a single event will be fired for all objects.
If the client has registered their MdFactoryListener to be notified when events are fired for specific
object types (see MdFactory.addMdFactoryListener(MdFactoryListener, String[]), the object map
will only contain objects of those specified interested types.
- Since:
- 9.2
- See Also:
-
Field Summary
FieldsFields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionMdFactoryEvent(MdFactory factory, String[] objectIDs) Deprecated.MdFactoryEvent(MdFactory factory, Map<String, String> objectMap) -
Method Summary
Modifier and TypeMethodDescriptionObjectclone()Returns a clone of this event.Returns the factory for this eventintReturns the number of objects included in this eventString[]Returns the object ids associated with this event.Map<String, String> Returns the object map (where the keys are the object ids and the values are the object types) associated with this event.protected voidsetObjectMap(Map<String, String> map) Methods inherited from class java.util.EventObject
getSource, toStringMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
_objectMap
protected Map<String,String> _objectMap
-
-
Constructor Details
-
MdFactoryEvent
Deprecated.useMdFactoryEvent(MdFactory, Map)instead- Parameters:
factory-objectIDs-
-
MdFactoryEvent
-
-
Method Details
-
getFactory
Returns the factory for this event- Returns:
- MdFactory
-
getObjectMap
public Map<String,String> getObjectMap()Returns the object map (where the keys are the object ids and the values are the object types) associated with this event. If the object's type is not known, the value of the map entry may be null.In certain cases with delete events, it may not be possible to know the object types. This is because by the time the event has been fired, the object(s) have been deleted from the server. Because of this, if the object's type is not known, the value of the map entry will be null. However, all null types will always exist in the map, even if the client specified which object types they are interested in.
- Returns:
- map of objects included in this event
-
getObjectIDs
public String[] getObjectIDs()Returns the object ids associated with this event. This returns- Returns:
- the array of object ids
-
getObjectCount
public int getObjectCount()Returns the number of objects included in this event- Returns:
- number of objects
-
setObjectMap
protected void setObjectMap(Map<String, String> map) -
clone
public Object clone()Returns a clone of this event. The copy will contain a reference to a clone of the internal data array, not a reference to the original internal data array of this MdFactoryEvent object.- Overrides:
clonein classObject- Returns:
- a clone of this event.
-
MdFactoryEvent(MdFactory, Map)instead