Package org.jivesoftware.smack.packet

Examples of org.jivesoftware.smack.packet.IQ$Type


     @param jingle
     *  @param jingleTransport
     *  @return
     */
    private IQ receiveSessionInitiateAction(Jingle jingle) throws XMPPException {
        IQ response = null;

        // Parse the Jingle and get any proposed transport candidates
        //addRemoteCandidates(obtainCandidatesList(jin));

        // Start offering candidates
View Full Code Here


     @param jingle
     *  @param jingleTransport
     *  @return
     */
    private IQ receiveTransportInfoAction(Jingle jingle) throws XMPPException {
        IQ response = null;

        // Parse the Jingle and get any proposed transport candidates
        //addRemoteCandidates(obtainCandidatesList(jin));

        //        // Start offering candidates
View Full Code Here

     * @return a Jingle packet
     * @throws XMPPException an exception
     * @see org.jivesoftware.smackx.jingle.JingleNegotiator.State#eventAccept(org.jivesoftware.smackx.packet.Jingle)
     */
    private IQ receiveContentAcceptAction(Jingle jingle) throws XMPPException {
        IQ response = null;

        // Parse the Jingle and get the accepted candidate
        List<TransportCandidate> accepted = obtainCandidatesList(jingle);
        if (!accepted.isEmpty()) {

View Full Code Here

    /**
     *  @param jingle
     *  @return
     */
    private IQ receiveSessionAcceptAction(Jingle jingle) {
        IQ response = null;

        LOGGER.debug("Transport stabilished");
        //triggerTransportEstablished(getAcceptedLocalCandidate(), getBestRemoteCandidate());

        //setNegotiatorState(JingleNegotiatorState.SUCCEEDED);
View Full Code Here

    /**
     * Pretty much nothing is valid for receiving once we've ended the session.
     */
    public IQ processJingle(JingleSession session, Jingle jingle, JingleActionEnum action) {
        IQ response = null;
       
        response = session.createJingleError(jingle, JingleError.MALFORMED_STANZA);

        return response;
    }
View Full Code Here

        reg.setFrom(toRegister);
        PacketFilter filter = new AndFilter(new PacketIDFilter(
            reg.getPacketID()), new PacketTypeFilter(IQ.class));
        PacketCollector collector = connection.createPacketCollector(filter);
        connection.sendPacket(reg);
        IQ result = (IQ) collector.nextResult(SmackConfiguration
            .getPacketReplyTimeout());

        // Stop queuing results
        collector.cancel();

        if (result == null) {
            // TODO This exception is shown incorrectly to the user!!
            throw new XMPPException("No response from server.");
        } else if (result.getType() == IQ.Type.ERROR) {
            throw new XMPPException(result.getError());
        } else {
            return (Registration) result;
        }
    }
View Full Code Here

        // TODO Auto-generated method stub

    }

    public IQ processJingle(JingleSession session, Jingle jingle, JingleActionEnum action) {
        IQ response = null;

        switch (action) {
            case SESSION_INITIATE:
                response = receiveSessionInitiateAction(session, jingle);
                break;
View Full Code Here

     * This method processes that action.
     */

    private IQ receiveSessionInitiateAction(JingleSession session, Jingle inJingle) {

        IQ response = null;
        boolean shouldAck = true;

        // According to XEP-166 when we get a session-initiate we need to check for:
        //      1. Initiator unknown
        //      2. Receiver redirection
View Full Code Here

     * Receive and process the <session-terminate> action.
     */
    private IQ receiveSessionTerminateAction(JingleSession session, Jingle jingle) {

        // According to XEP-166 the only thing we can do is ack.
        IQ response = session.createAck(jingle);

        try {
            session.terminate("Closed remotely");
        } catch (XMPPException e) {
            e.printStackTrace();
View Full Code Here

        // TODO Auto-generated method stub

    }

    public IQ processJingle(JingleSession session, Jingle jingle, JingleActionEnum action) {
        IQ response = null;

        switch (action) {

            case CONTENT_ACCEPT:
                break;
View Full Code Here

TOP

Related Classes of org.jivesoftware.smack.packet.IQ$Type

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.