Package org.apache.vysper.xmpp.server

Examples of org.apache.vysper.xmpp.server.ServerRuntimeContext


    public void testExecuteInvalidVerification() {
        assertExecuteVerification("12345", "invalid");
    }

    private void assertExecuteVerification(String token, String expectedType) {
        ServerRuntimeContext serverRuntimeContext = Mockito.mock(ServerRuntimeContext.class);
        Mockito.when(serverRuntimeContext.getServerEnitity()).thenReturn(TO);
       
        Stanza stanza = new StanzaBuilder("verify", NamespaceURIs.JABBER_SERVER_DIALBACK)
        .addAttribute("from", FROM.getFullQualifiedName())
        .addAttribute("to", TO.getFullQualifiedName())
        .addAttribute("id", ID)
View Full Code Here


        server.start();
       
        // enable server connection to use ping
        //server.addModule(new XmppPingModule());

        ServerRuntimeContext serverRuntimeContext = server.getServerRuntimeContext();
       
        Thread.sleep(2000);

        XMPPServerConnectorRegistry registry = serverRuntimeContext.getServerConnectorRegistry();
       
        XMPPServerConnector connector = registry.connect(remoteServer);
       
        Stanza stanza = new StanzaBuilder("message", NamespaceURIs.JABBER_SERVER)
            .addAttribute("from", localUser.getFullQualifiedName())
View Full Code Here

    public void testRemoteServerError() throws Exception {
        XMPPServerConnectorRegistry registry = Mockito.mock(XMPPServerConnectorRegistry.class);
        Mockito.when(registry.connect(SERVER)).thenThrow(new RemoteServerNotFoundException());

        ServerRuntimeContext serverRuntimeContext = Mockito.mock(ServerRuntimeContext.class);
        Mockito.when(serverRuntimeContext.getServerConnectorRegistry()).thenReturn(registry);

        DeliveringExternalInboundStanzaRelay relay = new DeliveringExternalInboundStanzaRelay(new TestExecutorService());
        relay.setServerRuntimeContext(serverRuntimeContext);

        RecordingDeliveryFailureStrategy deliveryFailureStrategy = new RecordingDeliveryFailureStrategy();
View Full Code Here

        XMPPServerConnector connector = Mockito.mock(XMPPServerConnector.class);
       
        XMPPServerConnectorRegistry registry = Mockito.mock(XMPPServerConnectorRegistry.class);
        Mockito.when(registry.connect(SERVER)).thenReturn(connector);

        ServerRuntimeContext serverRuntimeContext = Mockito.mock(ServerRuntimeContext.class);
        Mockito.when(serverRuntimeContext.getServerConnectorRegistry()).thenReturn(registry);

        DeliveringExternalInboundStanzaRelay relay = new DeliveringExternalInboundStanzaRelay(new TestExecutorService());
        relay.setServerRuntimeContext(serverRuntimeContext);

        RecordingDeliveryFailureStrategy deliveryFailureStrategy = new RecordingDeliveryFailureStrategy();
View Full Code Here

TOP

Related Classes of org.apache.vysper.xmpp.server.ServerRuntimeContext

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.