Novell exteNd Messaging Platform 5.2

com.sssw.jbroker.api.admin
Class ManageableBase

java.lang.Object
  extended bycom.sssw.jbroker.api.admin.ManageableBase
All Implemented Interfaces:
Manageable, Remote
Direct Known Subclasses:
ManageableCollectionBase

public abstract class ManageableBase
extends Object
implements Manageable

Utility base class to help implement a Manageable. It does reflection on its methods to determine the list of properties, their types, and whether a property is writable.

The inheriting class can implement methods names following javabean design pattern. For example if there are two methods "int getCount()" and "void setCount(int count)", then "Count" becomes a R/W property whose type is int.class.


Constructor Summary
ManageableBase(String name)
          Constructor for ManageableBase.
 
Method Summary
 String getName()
          get the name of the Manageable.
 Object[] getProperties(String[] propNames)
          Get values for the given property names.
 Object getProperty(String prop)
          Get a property value.
 Class getPropertyType(String prop)
          Get the type of the given property.
 boolean isWritable(String property)
          Determine if a given property is writable, or just read-only.
 String[] propertyNames()
          Get a list of the property names.
 Class[] propertyTypes()
          Get a list of the property types.
 void setProperties(Hashtable props)
          Set multiple properties.
 void setProperty(String prop, Object value)
          Set a property.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManageableBase

public ManageableBase(String name)
Constructor for ManageableBase.

Method Detail

getName

public String getName()
               throws RemoteException
Description copied from interface: Manageable
get the name of the Manageable.

Specified by:
getName in interface Manageable
Throws:
RemoteException

getProperty

public Object getProperty(String prop)
                   throws RemoteException,
                          ManageableException
Description copied from interface: Manageable
Get a property value.

Specified by:
getProperty in interface Manageable
Throws:
RemoteException
ManageableException

getProperties

public Object[] getProperties(String[] propNames)
                       throws RemoteException,
                              ManageableException
Description copied from interface: Manageable
Get values for the given property names.

Specified by:
getProperties in interface Manageable
Throws:
RemoteException
ManageableException

setProperties

public void setProperties(Hashtable props)
                   throws RemoteException,
                          ManageableException
Description copied from interface: Manageable
Set multiple properties. The keys in the hashtable are property names and the respective values are the property values.

Specified by:
setProperties in interface Manageable
Throws:
RemoteException
ManageableException

setProperty

public void setProperty(String prop,
                        Object value)
                 throws RemoteException,
                        ManageableException
Description copied from interface: Manageable
Set a property.

Specified by:
setProperty in interface Manageable
Throws:
RemoteException
ManageableException

propertyNames

public String[] propertyNames()
                       throws RemoteException
Description copied from interface: Manageable
Get a list of the property names.

Specified by:
propertyNames in interface Manageable
Throws:
RemoteException

propertyTypes

public Class[] propertyTypes()
                      throws RemoteException
Description copied from interface: Manageable
Get a list of the property types.

Specified by:
propertyTypes in interface Manageable
Throws:
RemoteException

getPropertyType

public Class getPropertyType(String prop)
                      throws RemoteException,
                             ManageableException
Description copied from interface: Manageable
Get the type of the given property.

Specified by:
getPropertyType in interface Manageable
Throws:
RemoteException
ManageableException

isWritable

public boolean isWritable(String property)
                   throws RemoteException,
                          ManageableException
Description copied from interface: Manageable
Determine if a given property is writable, or just read-only.

Specified by:
isWritable in interface Manageable
Throws:
RemoteException
ManageableException

Novell exteNd Messaging Platform 5.2

exteNd is a registered trademark of Novell, Inc.
Copyright 1998-2004 Novell, Inc. All Rights Reserved.