Package org.apache.vysper.xmpp.stanza

Examples of org.apache.vysper.xmpp.stanza.StanzaErrorCondition


            } else {
                elements = serviceCollector.processInfoRequest(new InfoRequest(stanza.getFrom(), to, node, stanza.getID()));
            }
        } catch (ServiceDiscoveryRequestException e) {
            // the request yields an error
            StanzaErrorCondition stanzaErrorCondition = e.getErrorCondition();
            if (stanzaErrorCondition == null) stanzaErrorCondition = StanzaErrorCondition.INTERNAL_SERVER_ERROR;
            return ServerErrorResponses.getInstance().getStanzaError(stanzaErrorCondition, stanza,
                    StanzaErrorType.CANCEL,
                    "disco info request failed.",
                    getErrorLanguage(serverRuntimeContext, sessionContext), null);
View Full Code Here


        List<Item> items = null;
        try {
            items = serviceCollector.processItemRequest(new InfoRequest(stanza.getFrom(), stanza.getTo(), node, stanza.getID()));
        } catch (ServiceDiscoveryRequestException e) {
            // the request yields an error
            StanzaErrorCondition stanzaErrorCondition = e.getErrorCondition();
            if (stanzaErrorCondition == null) stanzaErrorCondition = StanzaErrorCondition.INTERNAL_SERVER_ERROR;
            return ServerErrorResponses.getInstance().getStanzaError(stanzaErrorCondition, stanza,
                    StanzaErrorType.CANCEL,
                    "disco info request failed.",
                    getErrorLanguage(serverRuntimeContext, sessionContext), null);
View Full Code Here

                elements = serviceCollector.processInfoRequest(new InfoRequest(stanza.getFrom(), to, node, stanza
                        .getID()));
            }
        } catch (ServiceDiscoveryRequestException e) {
            // the request yields an error
            StanzaErrorCondition stanzaErrorCondition = e.getErrorCondition();
            if (stanzaErrorCondition == null)
                stanzaErrorCondition = StanzaErrorCondition.INTERNAL_SERVER_ERROR;
            return ServerErrorResponses.getInstance().getStanzaError(stanzaErrorCondition, stanza,
                    StanzaErrorType.CANCEL, "disco info request failed.",
                    getErrorLanguage(serverRuntimeContext, sessionContext), null);
View Full Code Here

        try {
            items = serviceCollector.processItemRequest(new InfoRequest(stanza.getFrom(), stanza.getTo(), node, stanza
                    .getID()));
        } catch (ServiceDiscoveryRequestException e) {
            // the request yields an error
            StanzaErrorCondition stanzaErrorCondition = e.getErrorCondition();
            if (stanzaErrorCondition == null)
                stanzaErrorCondition = StanzaErrorCondition.INTERNAL_SERVER_ERROR;
            return ServerErrorResponses.getInstance().getStanzaError(stanzaErrorCondition, stanza,
                    StanzaErrorType.CANCEL, "disco info request failed.",
                    getErrorLanguage(serverRuntimeContext, sessionContext), null);
View Full Code Here

            @SpecCompliant(spec = "rfc3921bis-08", section = "8.3.2", status = NOT_STARTED, coverage = UNKNOWN),
            @SpecCompliant(spec = "rfc3921bis-08", section = "4.3", status = NOT_STARTED, coverage = UNKNOWN) })
    public void process(Stanza failedToDeliverStanza, List<DeliveryException> deliveryExceptions)
            throws DeliveryException {

        StanzaErrorCondition stanzaErrorCondition = StanzaErrorCondition.SERVICE_UNAVAILABLE;
        StanzaErrorType errorType = StanzaErrorType.CANCEL;

        if (!(failedToDeliverStanza instanceof XMPPCoreStanza)) {
            throw new DeliveryException("could not return to sender");
        }
View Full Code Here

            @SpecCompliant(spec = "rfc3921bis-08", section = "8.1", status = FINISHED, coverage = COMPLETE),
            @SpecCompliant(spec = "rfc3921bis-08", section = "8.3.2", status = NOT_STARTED, coverage = UNKNOWN),
            @SpecCompliant(spec = "rfc3921bis-08", section = "4.3", status = NOT_STARTED, coverage = UNKNOWN) })
    public void process(Stanza failedToDeliverStanza, List<DeliveryException> deliveryExceptions)
            throws DeliveryException {
        StanzaErrorCondition stanzaErrorCondition = StanzaErrorCondition.SERVICE_UNAVAILABLE;
        StanzaErrorType errorType = StanzaErrorType.CANCEL;

        // TODO would it be better to check for the correct stanzas instead of assuming the stanza is wrapped?
        if (!(failedToDeliverStanza instanceof XMPPCoreStanza)) {
            throw new DeliveryException("could not return to sender");
View Full Code Here

            if (from == null) from = sessionContext.getInitiatingEntity();
            items = serviceCollector.processItemRequest(new InfoRequest(from, stanza.getTo(), node, stanza
                    .getID()));
        } catch (ServiceDiscoveryRequestException e) {
            // the request yields an error
            StanzaErrorCondition stanzaErrorCondition = e.getErrorCondition();
            if (stanzaErrorCondition == null)
                stanzaErrorCondition = StanzaErrorCondition.INTERNAL_SERVER_ERROR;
            return ServerErrorResponses.getStanzaError(stanzaErrorCondition, stanza,
                    StanzaErrorType.CANCEL, "disco info request failed.",
                    getErrorLanguage(serverRuntimeContext, sessionContext), null);
View Full Code Here

                elements = serviceCollector.processInfoRequest(new InfoRequest(from, to, node, stanza
                        .getID()));
            }
        } catch (ServiceDiscoveryRequestException e) {
            // the request yields an error
            StanzaErrorCondition stanzaErrorCondition = e.getErrorCondition();
            if (stanzaErrorCondition == null)
                stanzaErrorCondition = StanzaErrorCondition.INTERNAL_SERVER_ERROR;
            return ServerErrorResponses.getStanzaError(stanzaErrorCondition, stanza,
                    StanzaErrorType.CANCEL, "disco info request failed.",
                    getErrorLanguage(serverRuntimeContext, sessionContext), null);
View Full Code Here

TOP

Related Classes of org.apache.vysper.xmpp.stanza.StanzaErrorCondition

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.