Examples of ConfigFactory


Examples of com.sun.enterprise.admin.wsmgmt.config.spi.ConfigFactory

    /**
     * Initializes the message visualization service.
     */
    public void init() {
        try {
            ConfigFactory cf = ConfigFactory.getConfigFactory();
            ConfigProvider cp = cf.getConfigProvider();
            List list = cp.getManagedWebserviceApplicationIds();
            for (Iterator iter=list.iterator(); iter.hasNext();) {
                String appId = (String) iter.next();
                try {
                    ApplicationMediator am = new ApplicationMediator(appId);
View Full Code Here

Examples of com.sun.enterprise.admin.wsmgmt.config.spi.ConfigFactory

        _applicationId = id;
        _endpoints     = new Hashtable();

        // initializes the endpoint handler
        try {
            ConfigFactory cf = ConfigFactory.getConfigFactory();
            ConfigProvider cp = cf.getConfigProvider();
            WebServiceConfig[] wsc = cp.getWebserviceConfigs(id);

            for (int i=0; i<wsc.length; i++) {
                String mLevel = wsc[i].getMonitoringLevel();
View Full Code Here

Examples of com.sun.enterprise.management.config.ConfigFactory

        @return true for success.
     */
        protected final boolean
    removeConfigWithFactory( final ObjectName objectName )
    {
        ConfigFactory factory    = null;
       
        boolean     attempted   = false;
        try
        {
            final AMXConfig amxConfig   = getProxy( objectName, AMXConfig.class );
            final String interfaceName   = getSimpleInterfaceName( amxConfig );
            debug( "removeConfigWithFactory: " + objectName );
           
            factory  = createConfigFactory( interfaceName );
        }
        catch( Exception e )
        {
            debug( ExceptionUtil.toString( e ) );
        }
       
        if ( factory != null )
        {
            attempted   = true;
               
            // some factories have remove(), because they remove a singleton
            // instance, and some have remove( ObjectName )
            try
            {
                final Method m  = factory.getClass().getMethod( "remove", (Class[])null );
                if ( m != null )
                {
                    m.invoke( factory, (Object[])null );
                }
            }
            catch( NoSuchMethodException e )
            {
                factory.remove( objectName );
            }
            catch( Exception e )
            {
                throw new RuntimeException( e );
            }
View Full Code Here

Examples of com.sun.enterprise.management.config.ConfigFactory

   {
        ObjectName  result  = null;
   
        final Class[]   sig = ClassUtil.signatureFromClassnames( types );
           
        final ConfigFactory factory = createConfigFactory( simpleInterfaceName );
        if ( factory == null )
        {
            // look for the appropriate method
            final String createMethodName   = CREATE + simpleInterfaceName;
            final Method m   = this.getClass().getMethod( createMethodName, sig);
            if ( m == null )
            {
                throw new RuntimeException( "Can't find ConfigFactory for " + simpleInterfaceName );
            }
        }
        else
        {
      final Method createMethod  =
          factory.getClass().getDeclaredMethod( CREATE, sig);
      if ( createMethod != null )
      {
          result  = (ObjectName)createMethod.invoke( factory, args );
      }
      else
      {
          final String msg    = "Can't find method " + CREATE +
              " in factory " + factory.getClass().getName();
         
          throw new NoSuchMethodException( msg );
      }
        }
       
View Full Code Here

Examples of com.sun.enterprise.management.config.ConfigFactory

        Create a ConfigFactory or return null if couldn't be created.
    */
        protected ConfigFactory
   createConfigFactory( final String simpleClassname )
   {
        ConfigFactory factory   = null;
       
        try
        {
            final String    classname   = getFactoryPackage() + "." +
                                            simpleClassname + FACTORY_SUFFIX;
View Full Code Here

Examples of com.volantis.mcs.migrate.api.config.ConfigFactory

    public String migratePolicy(InputStream stream, String url)
            throws ResourceMigrationException, IOException {

        NotificationFactory notificationFactory =
                NotificationFactory.getDefaultInstance();
        ConfigFactory configFactory = ConfigFactory.getDefaultInstance();
        FrameworkFactory frameworkFactory =
                FrameworkFactory.getDefaultInstance();

        NotificationReporter notifier =
                notificationFactory.createLogDispatcherReporter(logger);

        ByteArrayOutputCreator outputCreator = new ByteArrayOutputCreator();
        ResourceMigrator migrator = configFactory.createDefaultResourceMigrator(
                notifier, true);
        InputMetadata meta = frameworkFactory.createInputMetadata(url, false);
        migrator.migrate(meta, stream, outputCreator);
        return outputCreator.getOutputStream().toString();
    }
View Full Code Here

Examples of com.volantis.mcs.migrate.api.config.ConfigFactory

        globalProjectMock =
                new RuntimeProjectMock("globalProjectMock", expectations);

        methodMock = new HttpGetMethodMock("methodMock", expectations);

        ConfigFactory migrationFactory = ConfigFactory.getDefaultInstance();
        RemotePolicyMigrator migrator =
                migrationFactory.createRemotePolicyMigrator();

        parser = new RemotePolicyBuilderParser(migrator);
    }
View Full Code Here

Examples of com.volantis.mcs.migrate.api.config.ConfigFactory

     */
    public RemoteReadersFactoryImpl(Period timeout, SystemClock clock) {

        factory = new HttpMethodFactoryImpl(timeout, clock);

        ConfigFactory migratorFactory = ConfigFactory.getDefaultInstance();
        RemotePolicyMigrator migrator =
                migratorFactory.createRemotePolicyMigrator();
        parser = new RemotePolicyBuilderParser(migrator);

    }
View Full Code Here

Examples of org.apache.ambari.server.state.ConfigFactory

    Set<String> hostNames = new HashSet<String>(){{
      add(hostname1);
      add(hostname2);
    }};
   
    ConfigFactory configFactory = injector.getInstance(ConfigFactory.class);
    Config config = configFactory.createNew(cluster, "global",
        new HashMap<String,String>() {{ put("a", "b"); }});
    config.setVersionTag("version1");
    cluster.addConfig(config);
    cluster.addDesiredConfig("_test", config);
   
View Full Code Here

Examples of org.apache.ambari.server.state.ConfigFactory

    Set<String> hostNames = new HashSet<String>() {{
      add(hostname1);
      add(hostname2);
    }};

    ConfigFactory configFactory = injector.getInstance(ConfigFactory.class);
    Config config = configFactory.createNew(cluster, "global",
      new HashMap<String, String>() {{
        put("a", "b");
      }});
    config.setVersionTag("version1");
    cluster.addConfig(config);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.