Package org.glassfish.jersey.media.sse

Examples of org.glassfish.jersey.media.sse.OutboundEvent


                || (event instanceof CharSequence)
                || (event instanceof Boolean)) {
            event = String.valueOf(event);
        }
        event = process(name, event);
        OutboundEvent outEvent = new OutboundEvent.Builder()
                .name(name)
                .mediaType(event instanceof String
                ? MediaType.TEXT_PLAIN_TYPE
                : MediaType.APPLICATION_JSON_TYPE)
                .data(event.getClass(), event)
View Full Code Here


                            return;
                        }
                        if (ec.isClosed()) {
                            return;
                        }
                        OutboundEvent outEvent = new OutboundEvent.Builder()
                                                    .name(name)
                                                    .mediaType(MediaType.APPLICATION_JSON_TYPE)
                                                    .data(event.getClass(), event)
                                                    .build();
                        try {
View Full Code Here

                            return;
                        }
                        if (ec.isClosed()) {
                            return;
                        }
                        OutboundEvent outEvent = new OutboundEvent.Builder()
                                                    .name(name)
                                                    .mediaType(MediaType.APPLICATION_JSON_TYPE)
                                                    .data(event.getClass(), event)
                                                    .build();
                        try {
View Full Code Here

    @PUT
    @Consumes(MediaType.APPLICATION_JSON)
    public void putMessage(Message message) {
        LOGGER.info("--> Message received.");

        OutboundEvent event = new OutboundEvent.Builder()
                .id(String.valueOf(nextMessageId.getAndIncrement()))
                .mediaType(MediaType.APPLICATION_JSON_TYPE)
                .data(Message.class, message)
                .build();
View Full Code Here

TOP

Related Classes of org.glassfish.jersey.media.sse.OutboundEvent

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.