activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/2] activemq-artemis git commit: ARTEMIS-271 Expose HttpRequest in WebSocketServerHandler
Date Tue, 20 Oct 2015 22:24:16 GMT
ARTEMIS-271 Expose HttpRequest in WebSocketServerHandler


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/aa492fb9
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/aa492fb9
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/aa492fb9

Branch: refs/heads/master
Commit: aa492fb9b636af6e651e7508a97e031348eb3f68
Parents: 7afd337
Author: Julian Scheid <julians37@gmail.com>
Authored: Tue Oct 20 23:12:18 2015 +0200
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Tue Oct 20 18:24:09 2015 -0400

----------------------------------------------------------------------
 .../artemis/core/protocol/stomp/WebSocketServerHandler.java    | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/aa492fb9/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/WebSocketServerHandler.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/WebSocketServerHandler.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/WebSocketServerHandler.java
index 62c41d3..425beba 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/WebSocketServerHandler.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/WebSocketServerHandler.java
@@ -49,6 +49,7 @@ public class WebSocketServerHandler extends SimpleChannelInboundHandler<Object>
 
    private static final String WEBSOCKET_PATH = "/stomp";
 
+   private HttpRequest httpRequest;
    private WebSocketServerHandshaker handshaker;
    private static final BinaryWebSocketEncoder BINARY_WEBSOCKET_ENCODER = new BinaryWebSocketEncoder();
 
@@ -75,6 +76,7 @@ public class WebSocketServerHandler extends SimpleChannelInboundHandler<Object>
 
       // Handshake
       WebSocketServerHandshakerFactory wsFactory = new WebSocketServerHandshakerFactory(this.getWebSocketLocation(req),
"v10.stomp,v11.stomp", false);
+      this.httpRequest = req;
       this.handshaker = wsFactory.newHandshaker(req);
       if (this.handshaker == null) {
          WebSocketServerHandshakerFactory.sendUnsupportedWebSocketVersionResponse(ctx.channel());
@@ -140,6 +142,10 @@ public class WebSocketServerHandler extends SimpleChannelInboundHandler<Object>
       return "ws://" + req.headers().get(HttpHeaders.Names.HOST) + WEBSOCKET_PATH;
    }
 
+   public HttpRequest getHttpRequest() {
+      return this.httpRequest;
+   }
+
    @Sharable
    private static final class BinaryWebSocketEncoder extends ChannelOutboundHandlerAdapter
{
 


Mime
View raw message