< prev index next >

src/java.management/share/classes/javax/management/ValueExp.java

Print this page




  63   wasn't so modified.
  64 
  65   We could reconsider this if the Query methods were augmented, for example
  66   with:
  67   AttributeValueExp<Number> numberAttr(String name);
  68   AttributeValueExp<String> stringAttr(String name);
  69   AttributeValueExp<Boolean> booleanAttr(String name);
  70   QueryExp <T> in(ValueExp<T> val, Set<ValueExp<T>> valueSet).
  71   But it's not really clear what numberAttr should do if it finds that the
  72   attribute is not in fact a Number.
  73  */
  74 public interface ValueExp extends java.io.Serializable {
  75 
  76     /**
  77      * Applies the ValueExp on a MBean.
  78      *
  79      * @param name The name of the MBean on which the ValueExp will be applied.
  80      *
  81      * @return  The <CODE>ValueExp</CODE>.
  82      *
  83      * @exception BadStringOperationException
  84      * @exception BadBinaryOpValueExpException
  85      * @exception BadAttributeValueExpException
  86      * @exception InvalidApplicationException



  87      */
  88     public ValueExp apply(ObjectName name)
  89             throws BadStringOperationException, BadBinaryOpValueExpException,
  90                    BadAttributeValueExpException, InvalidApplicationException;
  91 
  92     /**
  93      * Sets the MBean server on which the query is to be performed.
  94      *
  95      * @param s The MBean server on which the query is to be performed.
  96      *
  97      * @deprecated This method is not needed because a
  98      * <code>ValueExp</code> can access the MBean server in which it
  99      * is being evaluated by using {@link QueryEval#getMBeanServer()}.
 100      */
 101     @Deprecated
 102     public  void setMBeanServer(MBeanServer s) ;
 103 }


  63   wasn't so modified.
  64 
  65   We could reconsider this if the Query methods were augmented, for example
  66   with:
  67   AttributeValueExp<Number> numberAttr(String name);
  68   AttributeValueExp<String> stringAttr(String name);
  69   AttributeValueExp<Boolean> booleanAttr(String name);
  70   QueryExp <T> in(ValueExp<T> val, Set<ValueExp<T>> valueSet).
  71   But it's not really clear what numberAttr should do if it finds that the
  72   attribute is not in fact a Number.
  73  */
  74 public interface ValueExp extends java.io.Serializable {
  75 
  76     /**
  77      * Applies the ValueExp on a MBean.
  78      *
  79      * @param name The name of the MBean on which the ValueExp will be applied.
  80      *
  81      * @return  The <CODE>ValueExp</CODE>.
  82      *
  83      * @throws BadStringOperationException when an invalid string
  84      * operation is passed to a method for constructing a query
  85      * @throws BadBinaryOpValueExpException when an invalid expression
  86      * is passed to a method for constructing a query
  87      * @throws BadAttributeValueExpException when an invalid MBean
  88      * attribute is passed to a query constructing method
  89      * @throws InvalidApplicationException when an invalid apply is attempted
  90      */
  91     public ValueExp apply(ObjectName name)
  92             throws BadStringOperationException, BadBinaryOpValueExpException,
  93                    BadAttributeValueExpException, InvalidApplicationException;
  94 
  95     /**
  96      * Sets the MBean server on which the query is to be performed.
  97      *
  98      * @param s The MBean server on which the query is to be performed.
  99      *
 100      * @deprecated This method is not needed because a
 101      * <code>ValueExp</code> can access the MBean server in which it
 102      * is being evaluated by using {@link QueryEval#getMBeanServer()}.
 103      */
 104     @Deprecated
 105     public  void setMBeanServer(MBeanServer s) ;
 106 }
< prev index next >