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

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


        protected RelayResult deliver() {
            try {
                String receiverDomain = receiver.getDomain();
                if (receiverDomain != null && !receiverDomain.equals(serverEntity.getDomain())) {
                    if (serverRuntimeContext == null) {
                        return new RelayResult(new ServiceNotAvailableException("cannot retrieve component from server context"));
                    }
                    if (!receiverDomain.endsWith("." + serverEntity.getDomain())) {
                        return new RelayResult(new ServiceNotAvailableException("unsupported domain " + receiverDomain));
                    }

                    StanzaProcessor processor = serverRuntimeContext.getComponentStanzaProcessor(receiverDomain);
                    if (processor == null) {
                        return new RelayResult(new ServiceNotAvailableException("cannot retrieve component stanza processor for" + receiverDomain));
                    }

                    processor.processStanza(serverRuntimeContext, null, stanza, null);
                    return new RelayResult();
                }
View Full Code Here


                    case ERROR:
                        // silently ignore
                        return null;
                   
                    case GROUPCHAT:
                        return new RelayResult(new ServiceNotAvailableException());
                       
                    case HEADLINE:
                        return relayToAllSessions();
                   
                    default:
View Full Code Here

                // TODO no resource matches: service n/a
                return relayToBestSessions(false);
            }
            // for any other type of stanza
            return new RelayResult(new ServiceNotAvailableException());
        }
View Full Code Here

        protected RelayResult deliver() {
            try {
                String receiverDomain = receiver.getDomain();
                if (receiverDomain != null && !EntityUtils.isAddressingServer(receiver, serverEntity)) {
                    if (serverRuntimeContext == null) {
                        return new RelayResult(new ServiceNotAvailableException(
                                "cannot retrieve component from server context"));
                    }
                    if (!EntityUtils.isAddressingServerComponent(receiver, serverEntity)) {
                        return new RelayResult(new ServiceNotAvailableException("unsupported domain " + receiverDomain));
                    }

                    StanzaProcessor processor = serverRuntimeContext.getComponentStanzaProcessor(receiver);
                    if (processor == null) {
                        return new RelayResult(new ServiceNotAvailableException(
                                "cannot retrieve component stanza processor for" + receiverDomain));
                    }

                    processor.processStanza(serverRuntimeContext, null, stanza, null);
                    return new RelayResult();
View Full Code Here

                case ERROR:
                    // silently ignore
                    return null;

                case GROUPCHAT:
                    return new RelayResult(new ServiceNotAvailableException());

                case HEADLINE:
                    return relayToAllSessions();

                default:
View Full Code Here

                // TODO no resource matches: service n/a
                return relayToBestSessions(false);
            }

            // for any other type of stanza
            return new RelayResult(new ServiceNotAvailableException());
        }
View Full Code Here

        protected RelayResult deliver() {
            try {
                String receiverDomain = receiver.getDomain();
                if (receiverDomain != null && !EntityUtils.isAddressingServer(receiver, serverEntity)) {
                    if (serverRuntimeContext == null) {
                        return new RelayResult(new ServiceNotAvailableException(
                                "cannot retrieve component from server context"));
                    }
                    if (!EntityUtils.isAddressingServerComponent(receiver, serverEntity)) {
                        return new RelayResult(new ServiceNotAvailableException("unsupported domain " + receiverDomain));
                    }

                    StanzaProcessor processor = serverRuntimeContext.getComponentStanzaProcessor(receiver);
                    if (processor == null) {
                        return new RelayResult(new ServiceNotAvailableException(
                                "cannot retrieve component stanza processor for" + receiverDomain));
                    }

                    processor.processStanza(serverRuntimeContext, null, stanza, null);
                    return new RelayResult();
View Full Code Here

                case ERROR:
                    // silently ignore
                    return null;

                case GROUPCHAT:
                    return new RelayResult(new ServiceNotAvailableException());

                case HEADLINE:
                    return relayToAllSessions();

                default:
View Full Code Here

                // TODO no resource matches: service n/a
                return relayToBestSessions(false);
            }

            // for any other type of stanza
            return new RelayResult(new ServiceNotAvailableException());
        }
View Full Code Here

TOP

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

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.