Package de.novanic.eventservice.client.config

Examples of de.novanic.eventservice.client.config.ConfigurationTransferableDependentFactory


    @Test
    public void testGetInstance() {
        final EventServiceConfigurationTransferable theEventServiceConfiguration = new RemoteEventServiceConfigurationTransferable(0, 20000, 90000, 2, "12345678", DefaultClientConnector.class.getName());

        ConfigurationTransferableDependentFactory theConfigurationTransferableDependentFactory = ConfigurationTransferableDependentFactory.getInstance(theEventServiceConfiguration);
        assertSame(theConfigurationTransferableDependentFactory, ConfigurationTransferableDependentFactory.getInstance(theEventServiceConfiguration));
        assertSame(theConfigurationTransferableDependentFactory, ConfigurationTransferableDependentFactory.getInstance(theEventServiceConfiguration));
    }
View Full Code Here


    @Test
    public void testGetInstance_2() {
        final EventServiceConfigurationTransferable theEventServiceConfiguration = new RemoteEventServiceConfigurationTransferable(0, 20000, 90000, 2, "12345678", DefaultClientConnector.class.getName());

        ConfigurationTransferableDependentFactory theConfigurationTransferableDependentFactory = ConfigurationTransferableDependentFactory.getInstance(theEventServiceConfiguration);
        assertSame(theConfigurationTransferableDependentFactory, ConfigurationTransferableDependentFactory.getInstance());
        assertSame(theConfigurationTransferableDependentFactory, ConfigurationTransferableDependentFactory.getInstance());
    }
View Full Code Here

    @Test
    public void testGetInstance_3() {
        final EventServiceConfigurationTransferable theEventServiceConfiguration = new RemoteEventServiceConfigurationTransferable(0, 20000, 90000, 2, "12345678", DefaultClientConnector.class.getName());

        ConfigurationTransferableDependentFactory.reset();
        ConfigurationTransferableDependentFactory theConfigurationTransferableDependentFactory = ConfigurationTransferableDependentFactory.getInstance(theEventServiceConfiguration);
        assertSame(theConfigurationTransferableDependentFactory, ConfigurationTransferableDependentFactory.getInstance());
        assertSame(theConfigurationTransferableDependentFactory, ConfigurationTransferableDependentFactory.getInstance());
    }
View Full Code Here

    @Test
    public void testGetConnectionStrategyClientConnector() {
        final TestEventServiceConfigurationTransferable theConfig = new TestEventServiceConfigurationTransferable(DefaultClientConnector.class.getName());

        ConfigurationTransferableDependentFactory.reset();
        ConfigurationTransferableDependentFactory theConfigurationTransferableDependentFactory = ConfigurationTransferableDependentFactory.getInstance(theConfig);

        final ConnectionStrategyClientConnector theConnectionStrategyClientConnector = theConfigurationTransferableDependentFactory.getConnectionStrategyClientConnector();
        assertNotNull(theConnectionStrategyClientConnector);
        assertTrue(theConnectionStrategyClientConnector instanceof DefaultClientConnector);
    }
View Full Code Here

        final EventServiceConfigurationTransferable theEventServiceConfiguration = new RemoteEventServiceConfigurationTransferable(0, 20000, 90000, 2, "12345678", GWTStreamingClientConnector.class.getName());

        GWTMockUtilities.disarm();

        ConfigurationTransferableDependentFactory.reset();
        ConfigurationTransferableDependentFactory theConfigurationTransferableDependentFactory = ConfigurationTransferableDependentFactory.getInstance(theEventServiceConfiguration);

        GWTMockUtilities.restore();

        assertSame(theConfigurationTransferableDependentFactory, ConfigurationTransferableDependentFactory.getInstance());
        assertSame(theConfigurationTransferableDependentFactory, ConfigurationTransferableDependentFactory.getInstance());

        //NULL because GWTMockUtilities is used
        assertNull(theConfigurationTransferableDependentFactory.getConnectionStrategyClientConnector());
    }
View Full Code Here

    public void testInit_ConfigurationTransferableDependentFactory() {
        final TestEventServiceConfigurationTransferable theConfig = new TestEventServiceConfigurationTransferable();
        theConfig.setConnectionStrategyClientConnector(GWTStreamingClientConnector.class.getName());

        ConfigurationTransferableDependentFactory.reset();
        ConfigurationTransferableDependentFactory theConfigurationTransferableDependentFactory = ConfigurationTransferableDependentFactory.getInstance(theConfig);

        final ConnectionStrategyClientConnector theConnectionStrategyClientConnector = theConfigurationTransferableDependentFactory.getConnectionStrategyClientConnector();
        assertNotNull(theConnectionStrategyClientConnector);
        assertTrue(theConnectionStrategyClientConnector instanceof GWTStreamingClientConnector);
    }
View Full Code Here

    public void testInit_ConfigurationTransferableDependentFactory() {
        final TestEventServiceConfigurationTransferable theConfig = new TestEventServiceConfigurationTransferable();
        theConfig.setConnectionStrategyClientConnector(GWTStreamingClientConnector.class.getName());

        ConfigurationTransferableDependentFactory.reset();
        ConfigurationTransferableDependentFactory theConfigurationTransferableDependentFactory = ConfigurationTransferableDependentFactory.getInstance(theConfig);

        final ConnectionStrategyClientConnector theConnectionStrategyClientConnector = theConfigurationTransferableDependentFactory.getConnectionStrategyClientConnector();
        assertNotNull(theConnectionStrategyClientConnector);
        assertTrue(theConnectionStrategyClientConnector instanceof GWTStreamingClientConnector);
    }
View Full Code Here

        }
        if(aConfiguration == null) {
            throw new RemoteEventServiceRuntimeException("Invalid attempt to initialize the listening without a configuration!");
        }
        myConfiguration = aConfiguration;
        ConfigurationTransferableDependentFactory theConfigDependentFactory = ConfigurationTransferableDependentFactory.getInstance(aConfiguration);
        return (myConnectionStrategyClientConnector = theConfigDependentFactory.getConnectionStrategyClientConnector());
    }
View Full Code Here

TOP

Related Classes of de.novanic.eventservice.client.config.ConfigurationTransferableDependentFactory

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.