javax.management

Class StringValueExp

public class StringValueExp extends Object implements ValueExp

Represents a string being used as an argument to a relational constraint.

Since: 1.5

Constructor Summary
StringValueExp()
Constructs a new {@link StringValueExp}.
StringValueExp(String val)
Constructs a new {@link StringValueExp} using the specified value.
Method Summary
ValueExpapply(ObjectName name)
Applies the {@link StringValueExp} to the specified management bean by simply returning the value.
StringgetValue()
Returns the value.
voidsetMBeanServer(MBeanServer server)
Sets the {@link MBeanServer} on which the query will be performed.
StringtoString()
Returns the value in quotes.

Constructor Detail

StringValueExp

public StringValueExp()
Constructs a new {@link StringValueExp}.

StringValueExp

public StringValueExp(String val)
Constructs a new {@link StringValueExp} using the specified value.

Parameters: val the string value used for this expression.

Method Detail

apply

public ValueExp apply(ObjectName name)
Applies the {@link StringValueExp} to the specified management bean by simply returning the value.

Parameters: name the {@link ObjectName} of the bean.

Returns: the {@link StringValueExp} itself.

Throws: BadStringOperationException if an invalid string operation is used by the value expression. BadBinaryOpValueExpException if an invalid expression is used by the value expression. BadAttributeValueExpException if an invalid attribute is used by the value expression. InvalidApplicationException if the value expression is applied to the wrong type of bean.

getValue

public String getValue()
Returns the value.

Returns: the value.

setMBeanServer

public void setMBeanServer(MBeanServer server)
Sets the {@link MBeanServer} on which the query will be performed.

Parameters: server the new server.

toString

public String toString()
Returns the value in quotes.

Returns: the value (quoted).