sync4j.syncclient.spdm
Class SimpleDeviceManager

java.lang.Object
  extended bysync4j.syncclient.spdm.DeviceManager
      extended bysync4j.syncclient.spdm.SimpleDeviceManager

public class SimpleDeviceManager
extends DeviceManager

This is a simple implementation of DeviceManager that uses the file system to store and read nodes. The root of the configuration tree is specified with the system property spdm.dir.config; if null, the current directory is taken.

The tree structure is orgnaized in contexts, represented by directories, and leaf nodes, represented by properties files. Leaf nodes contain the configuration values.


Field Summary
static java.lang.String PROP_DM_DIR_BASE
          The system property name for the base directory
 
Constructor Summary
SimpleDeviceManager()
          Creates a new SimpleDeviceManager
 
Method Summary
 Device getDevice()
          Returns a Device object representing the device managed by this DeviceManager.
static DeviceManager getDeviceManager()
          Factory for SimpleDeviceManager.
 ManagementNode getManagementTree()
          The same as getManagementTree("")
 ManagementNode getManagementTree(java.lang.String context)
          Return the management tree given its context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_DM_DIR_BASE

public static final java.lang.String PROP_DM_DIR_BASE
The system property name for the base directory

See Also:
Constant Field Values
Constructor Detail

SimpleDeviceManager

public SimpleDeviceManager()
Creates a new SimpleDeviceManager

Method Detail

getDeviceManager

public static DeviceManager getDeviceManager()
Factory for SimpleDeviceManager.

Returns:
the newly created instance

getManagementTree

public ManagementNode getManagementTree(java.lang.String context)
Return the management tree given its context

Specified by:
getManagementTree in class DeviceManager
Parameters:
context - the node context
Returns:
the root management node starting at the specified context

getManagementTree

public ManagementNode getManagementTree()
The same as getManagementTree("")

Specified by:
getManagementTree in class DeviceManager
Returns:
getManagementTree("")

getDevice

public Device getDevice()
Description copied from class: DeviceManager
Returns a Device object representing the device managed by this DeviceManager.

Specified by:
getDevice in class DeviceManager
Returns:
a Device object representing the device managed by this device manager.


Copyright © 2003-2005 Sync4j.