Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AF9AF1869F for ; Wed, 25 Nov 2015 15:28:11 +0000 (UTC) Received: (qmail 60009 invoked by uid 500); 25 Nov 2015 15:28:11 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 59931 invoked by uid 500); 25 Nov 2015 15:28:11 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 59899 invoked by uid 99); 25 Nov 2015 15:28:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Nov 2015 15:28:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 063FB2C1F5C for ; Wed, 25 Nov 2015 15:28:11 +0000 (UTC) Date: Wed, 25 Nov 2015 15:28:11 +0000 (UTC) From: "Pavlo Kletsko (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAMEL-9364) Add ability to receive onOpen/onClose/onError websocket events through camel rout. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-9364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pavlo Kletsko updated CAMEL-9364: --------------------------------- Estimated Complexity: Novice (was: Unknown) > Add ability to receive onOpen/onClose/onError websocket events through camel rout. > ---------------------------------------------------------------------------------- > > Key: CAMEL-9364 > URL: https://issues.apache.org/jira/browse/CAMEL-9364 > Project: Camel > Issue Type: New Feature > Components: camel-atmosphere-websocket > Reporter: Pavlo Kletsko > Labels: patch > Original Estimate: 4h > Remaining Estimate: 4h > > There is a case when I need to maintain my own map (websocket session key, user object). Consequently I need to receive events from onOpen/onClose/onError methods of websocket protocol and add/remove item from my map. > To achieve this : > 1) I will add special servlet parameter, let's call it "events" with value "true". Which will enable this feature. By default it will be "false" (no parameter needed) and current functionality will not be influenced any how. > > CamelWsServlet > org.apache.camel.component.atmosphere.websocket.CamelWebSocketServlet > > events > true > > 2 > > 2) I will change WebsocketHandler sending exchange message with header key such as "websocket.eventType" and possible values : > ONOPEN_EVENT_TYPE = 1; > ONCLOSE_EVENT_TYPE = 0; > ONERROR_EVENT_TYPE = -1; > to camel rout each time when we trigger onOpen/onClose/onError methods. In addition to this header parameter session key will be send as well. > 3) Rout on client side will filter messages by header to distinguish events and their purposes. -- This message was sent by Atlassian JIRA (v6.3.4#6332)