com.ibm.streams.operator.control.variable
Class StringControlVariable
- java.lang.Object
-
- javax.management.NotificationBroadcasterSupport
-
- com.ibm.streams.operator.control.NotifierSupport<T>
-
- com.ibm.streams.operator.control.AbstractPersistentControlMBean<T>
-
- com.ibm.streams.operator.control.variable.AbstractControlVariable<java.lang.Object>
-
- com.ibm.streams.operator.control.variable.StringControlVariable
-
- All Implemented Interfaces:
- PersistentControlMBean, StringControlVariableMXBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter
public class StringControlVariable extends AbstractControlVariable<java.lang.Object> implements StringControlVariableMXBean
Provides the implementation of theString
control variable MBean.
Thename
of the control variable is taken from thename
property of this MBean's.It is recommended operators use
createStringControlVariable
instead of manually creating and registeringStringControlVariable
MBeans.ControlVariableAccessor
provides simple support of aString
control variable, hiding all the JMX interactions with the Job Control Plane.- Since:
- InfoSphere® Streams Version 4.0
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
IBM_COPYRIGHT
-
Fields inherited from class com.ibm.streams.operator.control.NotifierSupport
ATTRIBUTE_CHANGE_INFO
-
-
Constructor Summary
Constructors Constructor and Description StringControlVariable()
Create aStringControlVariableMXBean
with no initial value.StringControlVariable(java.lang.String initialValue)
Create aStringControlVariableMXBean
with an initial value.
-
Method Summary
Methods Modifier and Type Method and Description java.lang.String
getValue()
Get the value of this control variable.void
setValue(java.lang.String value)
Set the value of this control variable.void
updateControlState(byte[] controlState)
Update this variable's value from its persisted state.-
Methods inherited from class com.ibm.streams.operator.control.variable.AbstractControlVariable
getName, preRegister
-
Methods inherited from class com.ibm.streams.operator.control.AbstractPersistentControlMBean
persistControlState, setupComplete
-
Methods inherited from class com.ibm.streams.operator.control.NotifierSupport
getObjectName, getServer, nextSequence, postDeregister, postRegister, preDeregister, sendAttributeChangeNotification, sendBooleanAttributeChangeNotification, sendNotification, sendNotification
-
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.streams.operator.control.variable.StringControlVariableMXBean
getName
-
Methods inherited from interface com.ibm.streams.operator.control.PersistentControlMBean
setupComplete
-
-
-
-
Field Detail
-
IBM_COPYRIGHT
public static final java.lang.String IBM_COPYRIGHT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StringControlVariable
public StringControlVariable()
Create aStringControlVariableMXBean
with no initial value. The value will be set tonull
.
-
StringControlVariable
public StringControlVariable(java.lang.String initialValue)
Create aStringControlVariableMXBean
with an initial value.
-
-
Method Detail
-
getValue
public java.lang.String getValue()
Get the value of this control variable.- Specified by:
getValue
in interfaceStringControlVariableMXBean
- Returns:
- the value of this control variable.
-
setValue
public void setValue(java.lang.String value) throws java.io.IOException
Set the value of this control variable. If the value changes anAttributeChangeNotification
is sent using attribute nameValue
.When the value changes it will be persisted in the Job Control Plane.
- Specified by:
setValue
in interfaceStringControlVariableMXBean
- Parameters:
value
- New value for this control variable.- Throws:
java.io.IOException
- Exception persisting the control variable in the Job Control Plane.
-
updateControlState
public void updateControlState(byte[] controlState)
Update this variable's value from its persisted state.- Specified by:
updateControlState
in interfacePersistentControlMBean
- Parameters:
controlState
- Control state previous persisted for this MBean.
-
-