Package de.novanic.eventservice.client.config

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


        super.setUp();
        myClientLogger = new DummyClientLogger();
        ClientLoggerFactory.getClientLogger().attach(myClientLogger);

        myRemoteEventConnector = DefaultRemoteEventServiceFactoryTestMode.getInstance().getGWTRemoteEventConnector(myEventServiceAsyncMock);
        myRemoteEventConnector.initListen(new RemoteEventServiceConfigurationTransferable(0, 20000, 90000, 2, "dummy-connection-id", DefaultClientConnector.class.getName()));
    }
View Full Code Here


    @Test
    public void testInit_2() {
        assertFalse(myRemoteEventConnector.isActive());

        mockInit(new RemoteEventServiceConfigurationTransferable(0, 20000, 90000, 2, "dummy-connection-id", DefaultClientConnector.class.getName()));

        //init connector
        myRemoteEventConnector.init(new AsyncCallback<EventServiceConfigurationTransferable>() {
            public void onSuccess(EventServiceConfigurationTransferable anEventServiceConfigurationTransferable) {}
View Full Code Here

        assertEquals("Log: Activate RemoteEventConnector for domain \"test-domain\".", theLogMessages.get(0));
        assertEquals("Log: RemoteEventConnector activated.", theLogMessages.get(1));
        myClientLogger.clearLogMessages();

        try {
            myRemoteEventConnector.initListen(new RemoteEventServiceConfigurationTransferable(0, 20000, 90000, 2, "dummy-connection-id", DefaultClientConnector.class.getName()));
            fail("An exception was expected, because it was tried to change the connection strategy after the start of listening!");
        } catch(RemoteEventServiceRuntimeException e) {
            assertTrue(e.getMessage().contains("connection"));
            assertTrue(e.getMessage().contains("strategy"));
        }
View Full Code Here

        }
    }

    @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

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

    @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

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

    @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

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

    @Test
    public void testGetInstance_Error() {
        final EventServiceConfigurationTransferable theEventServiceConfiguration = new RemoteEventServiceConfigurationTransferable(0, 20000, 90000, 2, "12345678", String.class.getName());
        try {
            ConfigurationTransferableDependentFactory.reset();
            ConfigurationTransferableDependentFactory.getInstance(theEventServiceConfiguration);
            fail("Exception expected, because the configured class isn't registered / unknown!");
        } catch(ExceptionInInitializerError e) {
View Full Code Here

        } catch(ConfigurationException e) {}
    }

    @Test
    public void testGetInstance_Error_3() {
        final EventServiceConfigurationTransferable theEventServiceConfiguration = new RemoteEventServiceConfigurationTransferable(0, 20000, 90000, 2, "12345678", "NotExistingClassXY");
        try {
            ConfigurationTransferableDependentFactory.reset();
            ConfigurationTransferableDependentFactory.getInstance(theEventServiceConfiguration);
            fail("Exception expected, because the NotExistingClassXY class couldn't be found!");
        } catch(ConfigurationException e) {
View Full Code Here

        assertTrue(theConnectionStrategyClientConnector instanceof DefaultClientConnector);
    }

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

        GWTMockUtilities.disarm();

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

        verify(theServiceDefTargetMock, times(1)).getServiceEntryPoint();
    }

    private EventServiceConfigurationTransferable getDefaultConfiguration() {
        return new RemoteEventServiceConfigurationTransferable(0, 20000, 90000, 2, "ABC123", DefaultClientConnector.class.getName());
    }
View Full Code Here

TOP

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

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.