Package rocks.xmpp.extensions.rtt.model

Examples of rocks.xmpp.extensions.rtt.model.RealTimeText$Action


        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("user.address.city", "London");
        parameters.put("user.address['postal']", "QJR387");
        parameters.put("user.name", "Superman");

        Action action = new SimpleAction();
        pi.setParameters(action, stack, parameters);

        assertEquals(true, pi.isOrdered());
        assertEquals(3, actual.size());
        assertEquals("London", actual.get("user.address.city"));
View Full Code Here


        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put(sb.toString(), "");
        parameters.put("huuhaa", "");

        Action action = new SimpleAction();
        parametersInterceptor.setParameters(action, stack, parameters);
        assertEquals(1, actual.size());
    }
View Full Code Here

    public void testNoParametersAction() throws Exception {
        ParametersInterceptor interceptor = new ParametersInterceptor();
        interceptor.init();

        MockActionInvocation mai = new MockActionInvocation();
        Action action = new NoParametersAction();
        mai.setAction(action);

        interceptor.doIntercept(mai);
        interceptor.destroy();
    }
View Full Code Here

        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("user.address.city", "London");
        parameters.put("user.name", "Superman");

        Action action = new SimpleAction();
        pi.setParameters(action, stack, parameters);

        assertEquals("ordered should be false by default", false, pi.isOrdered());
        assertEquals(2, actual.size());
        assertEquals("London", actual.get("user.address.city"));
View Full Code Here

        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("user.address.city", "London");
        parameters.put("user.address['postal']", "QJR387");
        parameters.put("user.name", "Superman");

        Action action = new SimpleAction();
        pi.setParameters(action, stack, parameters);

        assertEquals(true, pi.isOrdered());
        assertEquals(3, actual.size());
        assertEquals("London", actual.get("user.address.city"));
View Full Code Here

    protected Object handleGetEffect()
    {
        // Effect is mapped to action, not activity
        // We return the first action encountered in the activity
        Action effectAction = null;
        Activity effect = this.metaObject.getEffect();
        if (effect != null)
        {
            Collection nodes = effect.getNodes();
            for (Iterator nodesIt = nodes.iterator(); nodesIt.hasNext() && effectAction == null;)
View Full Code Here

            }

            Iterator actions = transactionRequest.getAllActions().iterator();

            while (actions.hasNext()) {
                Action a = (Action) actions.next();

                switch (a.getType()) {
                case Action.DELETE:
                    elems[3].getType().encode(elems[3], a, output, hints);

                    break;
View Full Code Here

                "    <t p='5'> there,</t>\n" +
                "  </rtt>\n" +
                "</message>";

        Message message = unmarshal(xml, Message.class);
        RealTimeText realTimeText = message.getExtension(RealTimeText.class);

        Assert.assertNotNull(realTimeText);
        Assert.assertEquals(realTimeText.getEvent(), RealTimeText.Event.NEW);
        Assert.assertEquals(realTimeText.getSequence(), (Long) 123001L);
        Assert.assertEquals(realTimeText.getActions().size(), 7);
        Assert.assertTrue(realTimeText.getActions().get(0) instanceof RealTimeText.InsertText);
        Assert.assertTrue(realTimeText.getActions().get(1) instanceof RealTimeText.EraseText);
        Assert.assertTrue(realTimeText.getActions().get(2) instanceof RealTimeText.InsertText);
        Assert.assertTrue(realTimeText.getActions().get(3) instanceof RealTimeText.EraseText);
        Assert.assertTrue(realTimeText.getActions().get(4) instanceof RealTimeText.InsertText);
        Assert.assertTrue(realTimeText.getActions().get(5) instanceof RealTimeText.EraseText);
        Assert.assertTrue(realTimeText.getActions().get(6) instanceof RealTimeText.InsertText);

        Assert.assertEquals(((RealTimeText.InsertText) realTimeText.getActions().get(0)).getValue(), "Helo");
        Assert.assertEquals(((RealTimeText.InsertText) realTimeText.getActions().get(2)).getValue(), "lo...planet");
        Assert.assertEquals(((RealTimeText.InsertText) realTimeText.getActions().get(4)).getValue(), " World");
        Assert.assertEquals(((RealTimeText.InsertText) realTimeText.getActions().get(6)).getValue(), " there,");
    }
View Full Code Here

        super(xmppSession, RealTimeText.NAMESPACE);
    }

    RealTimeText createRealTimeMessage() {

        RealTimeText realTimeText = new RealTimeText(RealTimeText.Event.NEW);

        return realTimeText;
    }
View Full Code Here

TOP

Related Classes of rocks.xmpp.extensions.rtt.model.RealTimeText$Action

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.