Package com.sun.appserv.management.config

Examples of com.sun.appserv.management.config.PropertiesAccess


    {
      throw new IllegalArgumentException(
        "MBean does not implement PropertiesAccess: " + quote( src ) );
    }
   
    final PropertiesAccess  props  = (PropertiesAccess)proxy;
    testPropertiesGet( props );
  }
View Full Code Here


 
    public void
  checkSetPropertiesSetToSameValue( final ObjectName src )
    throws Exception
  {
    final PropertiesAccess  props  = (PropertiesAccess)getProxy( src );
   
    testPropertiesSetToSameValue( props );
  }
View Full Code Here

 
    public void
  checkCreateRemove( final ObjectName src )
    throws Exception
  {
    final PropertiesAccess  props  = (PropertiesAccess)getProxy( src );
   
    testPropertiesCreateRemove( props );
  }
View Full Code Here

    protected final void
  setAllProperties(
    final ObjectName  amxObjectName,
    final Properties  props )
  {
    final PropertiesAccess  proxy  = PropertiesAccess.class.cast(
        getCallbacks().getProxyFactory().getProxy( amxObjectName, AMX.class) );
   
    setAllProperties( proxy, props );
  }
View Full Code Here

    output={
        @HandlerOutput(name="propsValue", type=java.util.List.class)}
    )
    public void getPropsValue(HandlerContext handlerCtx) {
       
        PropertiesAccess mbean = (PropertiesAccess)handlerCtx.getInputValue("mbean");
        List<String> propsName = (List)handlerCtx.getInputValue("propsName");
        if (mbean==null){
            if (propsName != null){
                handlerCtx.setOutputValue("propsValue", new ArrayList(propsName.size()));
            }
            return;
        }
        Map<String, String>  mbeanProps = mbean.getProperties();
        List propsValue = new ArrayList(propsName.size());
        for(String nm : propsName){
           String value = mbeanProps.get(nm);
           propsValue.add( (value==null) ? "" : value);
        }
View Full Code Here

        @HandlerInput(name="propsName", type=java.util.List.class, required=true),
        @HandlerInput(name="propsValue", type=java.util.List.class, required=true)}
    )
    public void savePropsValue(HandlerContext handlerCtx) {
       
        PropertiesAccess mbean = (PropertiesAccess)handlerCtx.getInputValue("mbean");
        List<String> propsName = (List)handlerCtx.getInputValue("propsName");
        List<String> propsValue = (List)handlerCtx.getInputValue("propsValue");
        if (mbean==null){
            //TODO: log error
            return;
        }
        Map<String, String>  mbeanProps = mbean.getProperties();
        for(int i=0; i<propsName.size(); i++){
           String newValue = propsValue.get(i);
           String nm = propsName.get(i);
           AMXUtil.changeProperty(mbean, nm, newValue);
        }
View Full Code Here

    output={
        @HandlerOutput(name="result", type=Map.class)}
    )
    public void getMbeanProperties(HandlerContext handlerCtx) {
       
        PropertiesAccess mbean = (PropertiesAccess)handlerCtx.getInputValue("mbean");
        List<String> ignoreProps = (List)handlerCtx.getInputValue("ignoreProps");
        Map<String,String> allProps = mbean.getProperties();
       
        if (ignoreProps != null ){
            for(String nm : ignoreProps){
                if (allProps.get(nm) != null){
                    allProps.remove(nm);
View Full Code Here

TOP

Related Classes of com.sun.appserv.management.config.PropertiesAccess

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.