javaee / grizzly

Writing scalable server applications in the Java™ programming language has always been difficult. Before the advent of the Java New I/O API (NIO), thread management issues made it impossible for a server to scale to thousands of users. The Grizzly NIO framework has been designed to help developers to take advantage of the Java™ NIO API.
https://javaee.github.io/grizzly/
Other
221 stars 60 forks source link

Need to support DeliverRes.setFinished(true) for properly supporting the Bayeux Java API #473

Closed glassfishrobot closed 14 years ago

glassfishrobot commented 15 years ago

The current Bayeux JAVA API is broken as we need to re-add support for DeleverRes.setFinished(true) to force the Cometd DataHandler to write the JSON trailer.

Environment

Operating System: All Platform: All

Affected Versions

[1.9.8]

glassfishrobot commented 15 years ago

Reported by jfarcand@java.net

glassfishrobot commented 15 years ago

jfarcand@java.net said: The following now works:

Map<String, Object> map = new HashMap<String, Object>(); map.put("chat", message); map.put("user", user); Data data = new Data(); data.setMapData(map); data.setChannel("/chat/demo");

DeliverResponse deliverResponse = new DeliverResponse(); deliverResponse.setChannel("/chat/demo"); deliverResponse.setClientId(""); deliverResponse.setData(data); deliverResponse.setLast(true); deliverResponse.setFollow(true); deliverResponse.setFinished(true);

context.notify(deliverResponse);

Sending cometd/src/main/java/com/sun/grizzly/cometd/DataHandler.java Transmitting file data . Committed revision 2587.

glassfishrobot commented 15 years ago

Was assigned to jfarcand@java.net

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA GRIZZLY-473

glassfishrobot commented 14 years ago

Marked as fixed on Wednesday, December 16th 2009, 6:13:23 pm