This repository has been archived by the owner on Nov 18, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing SockJS session handling for xhr/jsonp polling.
The is a re-opening of AGSMPLPUSH-42 which intended to fix this issue but the fix was just plain wrong. The original issue was that the polling transports did to reply with any data when messages had been sent to them. The fix then was to add an explicit empty reply to trigger SockJS to repoll and it was then able to retrieve data. But the polling transports are "long polling" in that they will remain until either data is made available by the server side or the session times out. This commit fixes the session handling by introducing a field in the SockJSSession class which is the ChannelHandlerContext used for an open connection. This 'openContext' is then available to be used by SessionState implementations, for example the PollingSessionState. PollingSessionState sometimes needs to use the ChannelHandlerContext used to connect which is needed to send the SockJS OpenFrame, but successive calls needs to use the ChannelHandlerContext for the open session. Additional changes: - SockJS test server can now be started with mvn exec:java - sockjs-client.html contains examples of specifying transports types [https://issues.jboss.org/browse/AGSMPLPUSH-42]
- Loading branch information
Showing
14 changed files
with
76 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 0 additions & 37 deletions
37
...va/org/jboss/aerogear/io/netty/handler/codec/sockjs/handler/JsonpPollingSessionState.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 0 additions & 44 deletions
44
...java/org/jboss/aerogear/io/netty/handler/codec/sockjs/handler/XhrPollingSessionState.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 0 additions & 58 deletions
58
.../org/jboss/aerogear/io/netty/handler/codec/sockjs/handler/XhrPollingSessionStateTest.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.