Package org.apache.vysper.xmpp.delivery.failure

Examples of org.apache.vysper.xmpp.delivery.failure.RemoteServerNotFoundException


                connector.dispose();
                connector = null;
            }
        } else {
            // should never happen
            throw new RemoteServerNotFoundException("DNS lookup of remote server failed");
        }
       
        if(!successfullyConnected) {
            String exceptionMsg = "Failed to connect to XMPP server at " + otherServer;
           
            if(lastException instanceof UnresolvedAddressException) {
                throw new RemoteServerNotFoundException(exceptionMsg);
            } else {
                throw new RemoteServerTimeoutException(exceptionMsg);
            }
           
        }
View Full Code Here


    private static final Stanza STANZA = XMPPCoreStanza.getWrapper(StanzaBuilder.createMessageStanza(FROM, TO, LANG,
            BODY).build());

    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());
View Full Code Here

TOP

Related Classes of org.apache.vysper.xmpp.delivery.failure.RemoteServerNotFoundException

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.