Top Description Methods
org.osgi.service.dmt.spi

public Interface MountPoint

Imports
java.util.Dictionary

This 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.

Author
$Id: 9d221734942370006e6ce4dece0b00edc9612b03 $
Since
2.0

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object other)

This object must provide a suitable hash function such that a Mount Point given in MountPlugin#mountPointAdded(MountPoint) is equal to the corresponding Mount Point in MountPlugin#mountPointRemoved(MountPoint).

public String[]

Returns:

the absolute mount path of this MountPoint
getMountPath
()

Provides the absolute mount path of this MountPoint

public int
hashCode()

This object must provide a suitable hash function such that a Mount Point given in MountPlugin#mountPointAdded(MountPoint) has the same hashCode as the corresponding Mount Point in MountPlugin#mountPointRemoved(MountPoint).

public void
postEvent(String
the topic of the event to send. Valid values are:
  • org/osgi/service/dmt/DmtEvent/ADDED if the change was caused by an add action
  • org/osgi/service/dmt/DmtEvent/DELETED if the change was caused by a delete action
  • org/osgi/service/dmt/DmtEvent/REPLACED if the change was caused by a replace action
Must not be null.
topic
,
String[]
an array of affected node URI's. All URI's specified here are relative to the current MountPoint's mountPath. The value of this parameter determines the value of the event property EVENT_PROPERTY_NODES. An empty array or null is permitted. In both cases the value of the events EVENT_PROPERTY_NODES property will be set to an empty array.
relativeURIs
,
Dictionary<String, ?>
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 key EVENT_PROPERTY_NODES, then the value of this property is ignored and will be overwritten by relativeURIs.
properties
)

Posts an event via the DmtAdmin about changes in the current plugins subtree.

public void
postEvent(String
the topic of the event to send. Valid values are:
  • org/osgi/service/dmt/DmtEvent/RENAMED if the change was caused by a rename action
  • org/osgi/service/dmt/DmtEvent/COPIED if the change was caused by a copy action
Must not be null.
topic
,
String[]
an array of affected node URI's.

All URI's specified here are relative to the current MountPoint's mountPath. The value of this parameter determines the value of the event property EVENT_PROPERTY_NODES. An empty array or null is permitted. In both cases the value of the events EVENT_PROPERTY_NODES property will be set to an empty array.

relativeURIs
,
String[]
an array of affected node URI's. The value of this parameter determines the value of the event property EVENT_PROPERTY_NEW_NODES. An empty array or null is permitted. In both cases the value of the events EVENT_PROPERTY_NEW_NODES property will be set to an empty array.
newRelativeURIs
,
Dictionary<String, ?>
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 keys EVENT_PROPERTY_NODES or EVENT_PROPERTY_NEW_NODES, then the values of these properties are ignored and will be overwritten by relativeURIs and newRelativeURIs.
properties
)

Posts an event via the DmtAdmin about changes in the current plugins subtree.

Method Detail

equalsback to summary
public boolean equals(Object other)

This object must provide a suitable hash function such that a Mount Point given in MountPlugin#mountPointAdded(MountPoint) is equal to the corresponding Mount Point in MountPlugin#mountPointRemoved(MountPoint). Object#equals(Object)

Annotations
@Override
getMountPathback to summary
public String[] getMountPath()

Provides the absolute mount path of this MountPoint

Returns:String[]

the absolute mount path of this MountPoint

hashCodeback to summary
public int hashCode()

This object must provide a suitable hash function such that a Mount Point given in MountPlugin#mountPointAdded(MountPoint) has the same hashCode as the corresponding Mount Point in MountPlugin#mountPointRemoved(MountPoint). Object#hashCode()

Annotations
@Override
postEventback to summary
public void postEvent(String topic, String[] relativeURIs, Dictionary<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:String

the topic of the event to send. Valid values are:

  • org/osgi/service/dmt/DmtEvent/ADDED if the change was caused by an add action
  • org/osgi/service/dmt/DmtEvent/DELETED if the change was caused by a delete action
  • org/osgi/service/dmt/DmtEvent/REPLACED if the change was caused by a replace action
Must not be null.
relativeURIs:String[]

an array of affected node URI's. All URI's specified here are relative to the current MountPoint's mountPath. The value of this parameter determines the value of the event property EVENT_PROPERTY_NODES. An empty array or null is permitted. In both cases the value of the events EVENT_PROPERTY_NODES property will be set to an empty array.

properties:Dictionary<String, ?>

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 key EVENT_PROPERTY_NODES, then the value of this property is ignored and will be overwritten by relativeURIs.

Exceptions
IllegalArgumentException:
if the topic has not one of the defined values
postEventback to summary
public void postEvent(String topic, String[] relativeURIs, String[] newRelativeURIs, Dictionary<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:String

the topic of the event to send. Valid values are:

  • org/osgi/service/dmt/DmtEvent/RENAMED if the change was caused by a rename action
  • org/osgi/service/dmt/DmtEvent/COPIED if the change was caused by a copy action
Must not be null.
relativeURIs:String[]

an array of affected node URI's.

All URI's specified here are relative to the current MountPoint's mountPath. The value of this parameter determines the value of the event property EVENT_PROPERTY_NODES. An empty array or null is permitted. In both cases the value of the events EVENT_PROPERTY_NODES property will be set to an empty array.

newRelativeURIs:String[]

an array of affected node URI's. The value of this parameter determines the value of the event property EVENT_PROPERTY_NEW_NODES. An empty array or null is permitted. In both cases the value of the events EVENT_PROPERTY_NEW_NODES property will be set to an empty array.

properties:Dictionary<String, ?>

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 keys EVENT_PROPERTY_NODES or EVENT_PROPERTY_NEW_NODES, then the values of these properties are ignored and will be overwritten by relativeURIs and newRelativeURIs.

Exceptions
IllegalArgumentException:
if the topic has not one of the defined values