Package com.ibm.di.api.jmx.mbeans
Class TDIProperties
- java.lang.Object
-
- com.ibm.di.api.jmx.mbeans.BaseAdmin
-
- com.ibm.di.api.jmx.mbeans.TDIProperties
-
- All Implemented Interfaces:
BaseAdminMBean,BaseMBean,TDIPropertiesMBean
public class TDIProperties extends BaseAdmin implements TDIPropertiesMBean
Wrapper API to expose the functionality available from com.ibm.di.config.interfaces.TDIProperties.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMBEAN_TYPEType of the MBean.
-
Constructor Summary
Constructors Constructor Description TDIProperties(TDIProperties aLocalTDIProperties, java.lang.String aId)Class constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPropertyStore(PropertyStoreConfig config)Adds a property store to the end of the list of TDI-P's list of property stores.voidcommit()Does a commit on all property stores.static javax.management.ObjectNamegenObjectName(java.lang.String aUniqueCode)Generates object name for specified TDI-P.TDIPropertyStoregetDefaultStore()Gets the default property store.java.lang.StringgetId()Reads attribute "Id".TDIPropertyStoregetPasswordStore()Returns the password store.java.lang.ObjectgetProperty(java.lang.String key)Gets the property value from the property store chosen by TDIProperties.java.lang.ObjectgetProperty(java.lang.String propertyStoreName, java.lang.String key)Returns the property value from the named property store.TDIPropertyStoregetPropertyStore(java.lang.String name)Returns the named property store.java.lang.String[]getPropertyStoreKeys(java.lang.String propertyStoreName)Returns an array containing all the property keys in the named property store.java.util.ListgetPropertyStoreNames()Returns a list of property store names in use by TDI-P.java.lang.StringgetType()Reads attribute "Type".voidinsertPropertyStore(PropertyStoreConfig config, int atIndex)Inserts a connector interface at the given index.voidremoveProperty(java.lang.String propertyStoreName, java.lang.String key)Removes a property in the named property store.voidremovePropertyStore(java.lang.String propertyStoreName)Removes a property store from TDI-P.voidsetDefaultStore(TDIPropertyStore defaultStore)Sets the default property store.voidsetPasswordStore(TDIPropertyStore passwordStore)Sets the password store.TDIPropertyStoresetProperty(java.lang.String key, java.lang.Object value)Sets the property in the property store chosen by TDIProperties.TDIPropertyStoresetProperty(java.lang.String key, java.lang.Object value, boolean protect)Sets the property in the property store chosen by TDIProperties.voidsetProperty(java.lang.String propertyStoreName, java.lang.String key, java.lang.Object value)Sets the property in the named property store.java.lang.StringtrimKey(java.lang.String key)Trims the key from a given string.-
Methods inherited from class com.ibm.di.api.jmx.mbeans.BaseAdmin
getCurrentUserId, getKeyPropertyList
-
-
-
-
Field Detail
-
MBEAN_TYPE
public static final java.lang.String MBEAN_TYPE
Type of the MBean.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TDIProperties
public TDIProperties(TDIProperties aLocalTDIProperties, java.lang.String aId) throws DIException
Class constructor.- Parameters:
aLocalTDIProperties-TDIPropertiesinstance.aId- ID.- Throws:
DIException
-
-
Method Detail
-
getType
public java.lang.String getType()
Reads attribute "Type".getType()andgetId()are used in a common schema for object names for all MBeans in the management package. The key properties part of the object name of each MBean is defined as"type=" + getType() + ",id=" + getId(), for example "type=AssemblyLine,id=Hello".
-
getId
public java.lang.String getId()
Reads attribute "Id". The "Id" value should be different for different MBeans of the same type.getType()andgetId()are used in a common schema for object names for all MBeans in the management package. The key properties part of the object name of each MBean is defined as"type=" + getType() + ",id=" + getId(), for example "type=AssemblyLine,id=Hello".
-
commit
public void commit() throws java.rmi.RemoteException, java.lang.ExceptionDoes a commit on all property stores.- Specified by:
commitin interfaceTDIPropertiesMBean- Throws:
java.rmi.RemoteExceptionjava.lang.Exception- if Runtime or Security exception occurs
-
getProperty
public java.lang.Object getProperty(java.lang.String key) throws java.rmi.RemoteException, java.lang.ExceptionGets the property value from the property store chosen by TDIProperties.- Specified by:
getPropertyin interfaceTDIPropertiesMBean- Parameters:
key- The property name- Returns:
- The property value
- Throws:
java.rmi.RemoteException- if a communication-related exception occurs.java.lang.Exception- if Runtime or Security exception occurs
-
setProperty
public TDIPropertyStore setProperty(java.lang.String key, java.lang.Object value) throws java.rmi.RemoteException, java.lang.Exception
Sets the property in the property store chosen by TDIProperties.- Specified by:
setPropertyin interfaceTDIPropertiesMBean- Parameters:
key- The property namevalue- The new property value- Returns:
- the
TDIPropertyStoreto which the key/value pair was written - Throws:
java.rmi.RemoteException- if a communication-related exception occurs.java.lang.Exception- if Runtime or Security exception occurs
-
setProperty
public TDIPropertyStore setProperty(java.lang.String key, java.lang.Object value, boolean protect) throws java.rmi.RemoteException, java.lang.Exception
Sets the property in the property store chosen by TDIProperties.- Specified by:
setPropertyin interfaceTDIPropertiesMBean- Parameters:
key- The property namevalue- The new property valueprotect- True if value should be protected (driver dependent)- Returns:
- the
TDIPropertyStoreto which the key/value pair was written - Throws:
java.rmi.RemoteException- if a communication-related exception occurs.java.lang.Exception- if Runtime or Security exception occurs
-
removeProperty
public void removeProperty(java.lang.String propertyStoreName, java.lang.String key) throws java.rmi.RemoteException, java.lang.ExceptionRemoves a property in the named property store.- Specified by:
removePropertyin interfaceTDIPropertiesMBean- Parameters:
propertyStoreName- The name of the property storekey- The property to delete- Throws:
java.rmi.RemoteException- if a communication-related exception occurs.java.lang.Exception- if Runtime or Security exception occurs
-
getProperty
public java.lang.Object getProperty(java.lang.String propertyStoreName, java.lang.String key) throws java.rmi.RemoteException, java.lang.ExceptionReturns the property value from the named property store.- Specified by:
getPropertyin interfaceTDIPropertiesMBean- Parameters:
propertyStoreName- The name of the property storekey- The property value- Returns:
- The property value
- Throws:
java.rmi.RemoteException- if a communication-related exception occurs.java.lang.Exception- if Runtime or Security exception occurs
-
setProperty
public void setProperty(java.lang.String propertyStoreName, java.lang.String key, java.lang.Object value) throws java.rmi.RemoteException, java.lang.ExceptionSets the property in the named property store.- Specified by:
setPropertyin interfaceTDIPropertiesMBean- Parameters:
propertyStoreName- The name of the property storekey- The property namevalue- The new property value- Throws:
java.rmi.RemoteException- if a communication-related exception occurs.java.lang.Exception- if Runtime or Security exception occurs
-
getPropertyStoreKeys
public java.lang.String[] getPropertyStoreKeys(java.lang.String propertyStoreName) throws java.rmi.RemoteException, java.lang.ExceptionReturns an array containing all the property keys in the named property store.- Specified by:
getPropertyStoreKeysin interfaceTDIPropertiesMBean- Parameters:
propertyStoreName- The name of the property store- Returns:
- The propertyStoreKeys value
- Throws:
java.rmi.RemoteException- if a communication-related exception occurs.java.lang.Exception- if Runtime or Security exception occurs
-
addPropertyStore
public void addPropertyStore(PropertyStoreConfig config) throws java.rmi.RemoteException, java.lang.Exception
Adds a property store to the end of the list of TDI-P's list of property stores.- Specified by:
addPropertyStorein interfaceTDIPropertiesMBean- Parameters:
config- The property store configuration- Throws:
java.rmi.RemoteException- if a communication-related exception occurs.java.lang.Exception- if Runtime or Security exception occurs
-
insertPropertyStore
public void insertPropertyStore(PropertyStoreConfig config, int atIndex) throws java.rmi.RemoteException, java.lang.Exception
Inserts a connector interface at the given index. See addPropertyStore() for a description of parameters.- Specified by:
insertPropertyStorein interfaceTDIPropertiesMBean- Parameters:
config- The property store configurationatIndex- The position where the new connector is placed (-1 = END, 0 = First)- Throws:
java.rmi.RemoteException- if a communication-related exception occurs.java.lang.Exception- if Runtime or Security exception occurs
-
removePropertyStore
public void removePropertyStore(java.lang.String propertyStoreName) throws java.rmi.RemoteException, java.lang.ExceptionRemoves a property store from TDI-P. The connector interface is closed and then removed.- Specified by:
removePropertyStorein interfaceTDIPropertiesMBean- Parameters:
propertyStoreName- The name of the property store- Throws:
java.rmi.RemoteException- if a communication-related exception occurs.java.lang.Exception- if Runtime or Security exception occurs
-
getPropertyStoreNames
public java.util.List getPropertyStoreNames() throws java.lang.Exception, java.rmi.RemoteExceptionReturns a list of property store names in use by TDI-P.- Specified by:
getPropertyStoreNamesin interfaceTDIPropertiesMBean- Returns:
- The propertyStoreNames value
- Throws:
java.lang.Exception- if Runtime or Security exception occursjava.rmi.RemoteException- if a communication-related exception occurs.
-
getDefaultStore
public TDIPropertyStore getDefaultStore() throws java.lang.Exception, java.rmi.RemoteException
Gets the default property store.- Specified by:
getDefaultStorein interfaceTDIPropertiesMBean- Returns:
- the default property store
- Throws:
java.lang.Exception- if Runtime or Security exception occursjava.rmi.RemoteException- if a communication-related exception occurs.
-
setDefaultStore
public void setDefaultStore(TDIPropertyStore defaultStore) throws java.lang.Exception, java.rmi.RemoteException
Sets the default property store.- Specified by:
setDefaultStorein interfaceTDIPropertiesMBean- Parameters:
defaultStore- the new default property store- Throws:
java.lang.Exception- if Runtime or Security exception occursjava.rmi.RemoteException- if a communication-related exception occurs.
-
getPasswordStore
public TDIPropertyStore getPasswordStore() throws java.lang.Exception, java.rmi.RemoteException
Returns the password store.- Specified by:
getPasswordStorein interfaceTDIPropertiesMBean- Returns:
- the password store
- Throws:
java.lang.Exception- if Runtime or Security exception occursjava.rmi.RemoteException- if a communication-related exception occurs.
-
setPasswordStore
public void setPasswordStore(TDIPropertyStore passwordStore) throws java.lang.Exception, java.rmi.RemoteException
Sets the password store.- Specified by:
setPasswordStorein interfaceTDIPropertiesMBean- Parameters:
passwordStore- the new password store- Throws:
java.lang.Exception- if Runtime or Security exception occursjava.rmi.RemoteException- if a communication-related exception occurs.
-
getPropertyStore
public TDIPropertyStore getPropertyStore(java.lang.String name) throws java.lang.Exception, java.rmi.RemoteException
Returns the named property store.- Specified by:
getPropertyStorein interfaceTDIPropertiesMBean- Parameters:
name- the name of the property store- Returns:
- the
TDIPropertyStorewith specified name - Throws:
java.lang.Exception- if Runtime or Security exception occursjava.rmi.RemoteException- if a communication-related exception occurs.
-
trimKey
public java.lang.String trimKey(java.lang.String key) throws java.lang.Exception, java.rmi.RemoteExceptionTrims the key from a given string. For exampletrimKey("greeting:Hello, world!")will return the following string:"Hello, world!".- Specified by:
trimKeyin interfaceTDIPropertiesMBean- Parameters:
key- a string representing key:value pair- Returns:
- string containing only the value
- Throws:
java.lang.Exception- if Runtime or Security exception occursjava.rmi.RemoteException- if a communication-related exception occurs.
-
genObjectName
public static javax.management.ObjectName genObjectName(java.lang.String aUniqueCode) throws DIExceptionGenerates object name for specified TDI-P.- Parameters:
aUniqueCode- unique code used for building the TDI-P MBean id.- Returns:
- the generated object name
- Throws:
DIException- if error occurs while creating TDI-P JMX object name.
-
-