Examples of open()


Examples of org.apache.qpid.server.model.adapter.FileSystemPreferencesProviderImpl.open()

                                                 "{\"test_user\":{\"pref1\": \"pref1Value\", \"pref2\": 1.0} }");
        try
        {
            attributes.put(FileSystemPreferencesProvider.PATH, file.getAbsolutePath());
            PreferencesProvider provider = new FileSystemPreferencesProviderImpl(attributes,_authenticationProvider);
            provider.open();
            assertNotNull("Preferences provider was not recovered", provider);
            assertEquals("Unexpected name", "test-provider", provider.getName());
            assertEquals("Unexpected id", id, provider.getId());
            assertEquals("Unexpected path", file.getAbsolutePath(), provider.getAttribute(
                    FileSystemPreferencesProvider.PATH));
View Full Code Here

Examples of org.apache.qpid.server.model.testmodel.TestConfiguredObject.open()

    public void testOpeningResultsInErroredStateWhenResolutionFails() throws Exception
    {
        TestConfiguredObject object = new TestConfiguredObject(getName());
        object.setThrowExceptionOnPostResolve(true);
        object.open();
        assertFalse("Unexpected opened", object.isOpened());
        assertEquals("Unexpected state", State.ERRORED, object.getState());

        object.setThrowExceptionOnPostResolve(false);
        object.setAttributes(Collections.<String, Object>singletonMap(Port.DESIRED_STATE, State.ACTIVE));
View Full Code Here

Examples of org.apache.qpid.server.security.AccessControl.open()

        DefaultAccessControlFactory factory = new DefaultAccessControlFactory();
        Map<String, Object> attributes = new HashMap<String, Object>();
        attributes.put(GroupProvider.TYPE, FileAccessControlProviderConstants.ACL_FILE_PROVIDER_TYPE);
        attributes.put(FileAccessControlProviderConstants.PATH, aclFile.getAbsolutePath());
        AccessControl acl = factory.createInstance(attributes, mock(EventLoggerProvider.class));
        acl.open();

        assertNotNull("ACL was not created from acl file: " + aclFile.getAbsolutePath(), acl);
    }

    public void testCreateInstanceWhenAclFileIsSpecifiedButDoesNotExist()
View Full Code Here

Examples of org.apache.qpid.server.security.FileTrustStore.open()

        when(broker.getModel()).thenReturn(factory.getModel());
        TaskExecutor executor = new CurrentThreadTaskExecutor();
        when(broker.getTaskExecutor()).thenReturn(executor);

        final FileTrustStore trustStore = new FileTrustStoreImpl(attributes, broker);
        trustStore.open();
        assertNotNull("Trust store configured object is not created", trustStore);
        assertEquals(id, trustStore.getId());

        Subject.doAs(SecurityManager.getSubjectWithAddedSystemRights(), new PrivilegedAction<Object>()
        {
View Full Code Here

Examples of org.apache.qpid.server.security.FileTrustStoreImpl.open()

        when(broker.getModel()).thenReturn(factory.getModel());
        TaskExecutor executor = new CurrentThreadTaskExecutor();
        when(broker.getTaskExecutor()).thenReturn(executor);

        final FileTrustStore trustStore = new FileTrustStoreImpl(attributes, broker);
        trustStore.open();
        assertNotNull("Trust store configured object is not created", trustStore);
        assertEquals(id, trustStore.getId());

        Subject.doAs(SecurityManager.getSubjectWithAddedSystemRights(), new PrivilegedAction<Object>()
        {
View Full Code Here

Examples of org.apache.qpid.server.security.auth.database.Base64MD5PasswordFilePrincipalDatabase.open()

    public void perform(String user, char[] password) throws Exception
    {
        CRAMMD5HexInitialiser initialiser = new CRAMMD5HexInitialiser();

        PrincipalDatabase db = new Base64MD5PasswordFilePrincipalDatabase();
        db.open(_file);
        initialiser.initialise(db);

        PasswordCallback passwordCallback = new PasswordCallback("password:", false);
        NameCallback usernameCallback = new NameCallback("user:", user);
View Full Code Here

Examples of org.apache.qpid.server.security.auth.database.PrincipalDatabase.open()

    public void perform(String user, char[] password) throws Exception
    {
        CRAMMD5HexInitialiser initialiser = new CRAMMD5HexInitialiser();

        PrincipalDatabase db = new Base64MD5PasswordFilePrincipalDatabase();
        db.open(_file);
        initialiser.initialise(db);

        PasswordCallback passwordCallback = new PasswordCallback("password:", false);
        NameCallback usernameCallback = new NameCallback("user:", user);
View Full Code Here

Examples of org.apache.qpid.server.virtualhost.TestMemoryVirtualHost.open()

        attributes.put(VirtualHost.NAME, getName());
        attributes.put(VirtualHost.TYPE, TestMemoryVirtualHost.VIRTUAL_HOST_TYPE);
        attributes.put(VirtualHost.ID, UUID.randomUUID());

        VirtualHost<?,?,?> host = new TestMemoryVirtualHost(attributes, _virtualHostNode);
        host.open();

        assertNotNull("Null is returned", host);
        assertEquals("Unexpected name", getName(), host.getName());
    }
View Full Code Here

Examples of org.apache.qpid.test.utils.JMXTestUtils.open()

    {
        JMXTestUtils jmxUtils = null;
        try
        {
            jmxUtils = new JMXTestUtils(this, "guest", "guest");
            jmxUtils.open();
        }
        catch (Exception e)
        {
            fail("Unable to establish JMX connection, test cannot proceed");
        }
View Full Code Here

Examples of org.apache.qpid.transport.network.mina.MINANetworkDriver.open()

        {
            sslFactory = new SSLContextFactory(sslConfig.getKeystorePath(), sslConfig.getKeystorePassword(), sslConfig.getCertType());
        }
       
        MINANetworkDriver driver = new MINANetworkDriver(ioConnector);
        driver.open(brokerDetail.getPort(), address.getAddress(), protocolHandler, null, sslFactory);
        protocolHandler.setNetworkDriver(driver);
    }
}
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.