Package org.osgi.service.dmt.spi
Interface MountPoint
-
public interface MountPointThis interface can be implemented to represent a single mount point.It provides function to get the absolute mounted uri and a shortcut method to post events via the DmtAdmin.
- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanequals(java.lang.Object other)This object must provide a suitable hash function such that a Mount Point given inMountPlugin.mountPointAdded(MountPoint)is equal to the corresponding Mount Point inMountPlugin.mountPointRemoved(MountPoint).java.lang.String[]getMountPath()Provides the absolute mount path of thisMountPointinthashCode()This object must provide a suitable hash function such that a Mount Point given inMountPlugin.mountPointAdded(MountPoint)has the same hashCode as the corresponding Mount Point inMountPlugin.mountPointRemoved(MountPoint).voidpostEvent(java.lang.String topic, java.lang.String[] relativeURIs, java.lang.String[] newRelativeURIs, java.util.Dictionary<java.lang.String,?> properties)Posts an event via the DmtAdmin about changes in the current plugins subtree.voidpostEvent(java.lang.String topic, java.lang.String[] relativeURIs, java.util.Dictionary<java.lang.String,?> properties)Posts an event via the DmtAdmin about changes in the current plugins subtree.
-
-
-
Method Detail
-
getMountPath
java.lang.String[] getMountPath()
Provides the absolute mount path of thisMountPoint- Returns:
- the absolute mount path of this
MountPoint
-
postEvent
void postEvent(java.lang.String topic, java.lang.String[] relativeURIs, java.util.Dictionary<java.lang.String,?> properties)Posts an event via the DmtAdmin about changes in the current plugins subtree.This method distributes Events asynchronously to the EventAdmin as well as to matching local DmtEventListeners.
- Parameters:
topic- the topic of the event to send. Valid values are:org/osgi/service/dmt/DmtEvent/ADDEDif the change was caused by an add action-
org/osgi/service/dmt/DmtEvent/DELETEDif the change was caused by a delete action -
org/osgi/service/dmt/DmtEvent/REPLACEDif the change was caused by a replace action
null.relativeURIs- an array of affected nodeURI's. AllURI's specified here are relative to the currentMountPoint's mountPath. The value of this parameter determines the value of the event propertyEVENT_PROPERTY_NODES. An empty array ornullis permitted. In both cases the value of the eventsEVENT_PROPERTY_NODESproperty will be set to an empty array.properties- an optional parameter that can be provided to add properties to the Event that is going to be send by the DMTAdmin. If the properties contain a keyEVENT_PROPERTY_NODES, then the value of this property is ignored and will be overwritten byrelativeURIs.- Throws:
java.lang.IllegalArgumentException- if the topic has not one of the defined values
-
postEvent
void postEvent(java.lang.String topic, java.lang.String[] relativeURIs, java.lang.String[] newRelativeURIs, java.util.Dictionary<java.lang.String,?> properties)Posts an event via the DmtAdmin about changes in the current plugins subtree.This method distributes Events asynchronously to the EventAdmin as well as to matching local DmtEventListeners.
- Parameters:
topic- the topic of the event to send. Valid values are:org/osgi/service/dmt/DmtEvent/RENAMEDif the change was caused by a rename action-
org/osgi/service/dmt/DmtEvent/COPIEDif the change was caused by a copy action
null.relativeURIs- an array of affected nodeURI's.All
URI's specified here are relative to the currentMountPoint's mountPath. The value of this parameter determines the value of the event propertyEVENT_PROPERTY_NODES. An empty array ornullis permitted. In both cases the value of the eventsEVENT_PROPERTY_NODESproperty will be set to an empty array.newRelativeURIs- an array of affected nodeURI's. The value of this parameter determines the value of the event propertyEVENT_PROPERTY_NEW_NODES. An empty array ornullis permitted. In both cases the value of the eventsEVENT_PROPERTY_NEW_NODESproperty will be set to an empty array.properties- an optional parameter that can be provided to add properties to the Event that is going to be send by the DMTAdmin. If the properties contain the keysEVENT_PROPERTY_NODESorEVENT_PROPERTY_NEW_NODES, then the values of these properties are ignored and will be overwritten byrelativeURIsandnewRelativeURIs.- Throws:
java.lang.IllegalArgumentException- if the topic has not one of the defined values
-
hashCode
int hashCode()
This object must provide a suitable hash function such that a Mount Point given inMountPlugin.mountPointAdded(MountPoint)has the same hashCode as the corresponding Mount Point inMountPlugin.mountPointRemoved(MountPoint).Object.hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
boolean equals(java.lang.Object other)
This object must provide a suitable hash function such that a Mount Point given inMountPlugin.mountPointAdded(MountPoint)is equal to the corresponding Mount Point inMountPlugin.mountPointRemoved(MountPoint).Object.equals(Object)- Overrides:
equalsin classjava.lang.Object
-
-