Package com.microsoft.windowsazure

Examples of com.microsoft.windowsazure.Configuration


            profile = "";
        } else if (profile.length() != 0 && !profile.endsWith(".")) {
            profile = profile + ".";
        }
       
        Configuration resultConfiguration = configure(profile, configuration, uri, subscriptionId, keyStoreLocation, keyStorePassword, keyStoreType);
        resultConfiguration.setProperty(profile+ManagementConfiguration.CLOUD_SERVICE_NAME, cloudServiceName);
        resultConfiguration.setProperty(profile+ManagementConfiguration.JOB_COLLECTION_NAME, jobCollectionName);
        return resultConfiguration;
    }
View Full Code Here


        String outputKeyStore = System.getProperty("user.home") + File.separator
                + ".azure" + File.separator + subscriptionId + ".out";
        URI managementUrl = createCertficateFromPublishSettingsFile(publishSettingsFile, subscriptionId, outputKeyStore);
       
        // create new configuration object
        Configuration configuration = Configuration.load();
        return ManagementConfiguration.configure(null, configuration, managementUrl, subscriptionId, outputKeyStore, "",
                KeyStoreType.pkcs12);
    }
View Full Code Here

    }

    @Before
    public void createService() throws Exception {
        // reinitialize configuration from known state
        Configuration config = createConfiguration();

        // add LoggingFilter to any pipeline that is created
        Registry builder = (Registry) config.getBuilder();
        builder.alter(ServiceBusContract.class, Client.class,
                new Alteration<Client>() {
                    @Override
                    public Client alter(String profile, Client instance,
                            Builder builder, Map<String, Object> properties) {
View Full Code Here

        assertNotNull(service);
        assertEquals(ServiceBusExceptionProcessor.class, service.getClass());
    }

    public Configuration newConfiguration() {
        Configuration config = new Configuration();
        ServiceBusConfiguration.configureWithWrapAuthentication(config,
                "my-namespace", "my-identity", "my-shared-secret",
                ".servicebus.windows.net",
                "-sb.accesscontrol.windows.net/WRAPv0.9");
        return config;
View Full Code Here

                "-sb.accesscontrol.windows.net/WRAPv0.9");
        return config;
    }

    private Configuration newConfigurationWithProfile() {
        Configuration config = newConfiguration();
        ServiceBusConfiguration.configureWithWrapAuthentication("other",
                config, "my-other-namespace", "my-other-identity",
                "my-shared-secret", ".servicebus.windows.net",
                "-sb.accesscontrol.windows.net/WRAPv0.9");
        return config;
View Full Code Here

                "-sb.accesscontrol.windows.net/WRAPv0.9");
        return config;
    }

    private Configuration newConfigurationWithConnectionString() {
        Configuration config = newConfiguration();
        ServiceBusConfiguration.configureWithConnectionString(null, config,
                "Endpoint=https://my-other-namespace.servicebus.windows.net/;"
                        + "SharedSecretIssuer=owner;"
                        + "SharedSecretValue=my-shared-secret");
        return config;
View Full Code Here

    }

    @Test
    public void theServiceClassMayBeCreatedDirectlyWithConfig()
            throws Exception {
        Configuration config = newConfiguration();
        ServiceBusContract service = ServiceBusService.create(config);

        assertNotNull(service);
        assertEquals(ServiceBusExceptionProcessor.class, service.getClass());
    }
View Full Code Here

        assertEquals(ServiceBusExceptionProcessor.class, service.getClass());
    }

    @Test
    public void theServiceClassMayAlsoBeCreatedFromConfig() throws Exception {
        Configuration config = newConfiguration();
        ServiceBusContract service = config.create(ServiceBusContract.class);

        assertNotNull(service);
        assertEquals(ServiceBusExceptionProcessor.class, service.getClass());
    }
View Full Code Here

        assertEquals(ServiceBusExceptionProcessor.class, service.getClass());
    }

    @Test
    public void testDefaultBuilderCreatesServiceImpl() throws Exception {
        Configuration config = newConfiguration();
        ServiceBusContract service = config.create(ServiceBusContract.class);

        assertNotNull(service);
    }
View Full Code Here

        assertNotNull(service);
    }

    @Test
    public void theServiceClassCanBeCreatedThroughAProfile() throws Exception {
        Configuration config = newConfigurationWithProfile();
        ServiceBusContract service = config.create("other",
                ServiceBusContract.class);

        assertNotNull(service);
        assertEquals(ServiceBusExceptionProcessor.class, service.getClass());
    }
View Full Code Here

TOP

Related Classes of com.microsoft.windowsazure.Configuration

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.