Package org.jboss.aerogear.simplepush.protocol.impl

Examples of org.jboss.aerogear.simplepush.protocol.impl.PingMessageImpl


        @Override
        public PingMessageImpl deserialize(final JsonParser jp, final DeserializationContext ctxt) throws IOException {
            final ObjectCodec oc = jp.getCodec();
            final JsonNode node = oc.readTree(jp);
            if (node.isObject() && node.size() == 0) {
                return new PingMessageImpl(node.toString());
            }
            throw new RuntimeException("Invalid Ping message format : [" + node.toString() + "]");
        }
View Full Code Here


        final String json = toJson(new RegisterMessageImpl(channelId));
        return new TextWebSocketFrame(json);
    }

    public static TextWebSocketFrame pingWebSocketFrame() {
        return new TextWebSocketFrame(toJson(new PingMessageImpl()));
    }
View Full Code Here

    public static String unregisterChannelIdMessageSockJSFrame(final String channelId) {
        return asSockjsMessage(toJson(new UnregisterMessageImpl(channelId)));
    }

    public static String pingSockJSFrame() {
        return asSockjsMessage(toJson(new PingMessageImpl()));
    }
View Full Code Here

        pollXhrHelloMessageResponse(factory, sessionUrl);

        final FullHttpResponse registerChannelIdRequest = sendXhrPingRequest(factory, sessionUrl);
        assertThat(registerChannelIdRequest.getStatus(), is(HttpResponseStatus.NO_CONTENT));

        final PingMessageImpl pingResponse = pollXhrPingMessageResponse(factory, sessionUrl);
        assertThat(pingResponse.getPingMessage(), equalTo(PingMessage.PING_MESSAGE));
    }
View Full Code Here

TOP

Related Classes of org.jboss.aerogear.simplepush.protocol.impl.PingMessageImpl

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.