Commits

Andy Moncsek  committed 70e9560

fixed tyrus client config

  • Participants
  • Parent commits a2f0dec

Comments (0)

Files changed (4)

File JacpFXTwitterWebsocketClient/pom.xml

             <scope>compile</scope>
         </dependency>
         <dependency>
+            <groupId>org.glassfish.tyrus</groupId>
+            <artifactId>tyrus-container-grizzly</artifactId>
+            <version>${tyrusWebsocket.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
             <groupId>com.google.code.gson</groupId>
             <artifactId>gson</artifactId>
             <version>${gson.version}</version>

File JacpFXWebsocketChatClient/pom.xml

         </dependency>
         <dependency>
             <groupId>org.glassfish.tyrus</groupId>
-            <artifactId>tyrus-client</artifactId>
+            <artifactId>tyrus-container-grizzly</artifactId>
             <version>${tyrusWebsocket.version}</version>
             <scope>compile</scope>
         </dependency>
+
     </dependencies>
 </project>

File JacpFXWebsocketChatClient/src/main/java/org/jacp/chat/callbacks/WebSocketEndpoint.java

     public void init() {
         this.log.info("WebSocketEndpoint start");
         ClientManager client = ClientManager.createClient();
-        // authentication example
-       /* try {
-            ClientEndpointConfig config =                        ClientEndpointConfig.Builder.create().configurator(new ClientEndpointConfig.Configurator() {
-                @Override
-                public void beforeRequest(Map<String, List<String>> headers) {
-                    byte[] encodedPassword = ( userName + ":" + password ).getBytes();
-                    BASE64Encoder encoder = new BASE64Encoder();
-                    headers.put("Authorization",
-                            Arrays.asList("Basic " + encoder.encode( encodedPassword )));
-                }
-            }).build();*/
         try {
             session = client.connectToServer(this, ClientEndpointConfig.Builder.create().build(), getURI());
             messageLatch.await(5, TimeUnit.SECONDS);

File JacpFXWebsocketChatClient/src/main/java/org/jacp/chat/components/ChatView.java

-/************************************************************************
- *
- * Copyright (C) 2010 - 2012
- *
- * [ComponentRight.java]
- * AHCP Project (http://jacp.googlecode.com)
+/*
+ * Copyright (c) 2013, Andy Moncsek, inc.
  * All rights reserved.
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at 
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ * that the following conditions are met:
  *
- *     http://www.apache.org/licenses/LICENSE-2.0 
+ *    Redistributions of source code must retain the above copyright notice, this list of conditions and the
+ *    following disclaimer.
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an "AS IS"
- * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
- * express or implied. See the License for the specific language
- * governing permissions and limitations under the License.
+ *    Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
+ *    the following disclaimer in the documentation and/or other materials provided with the distribution.
  *
+ *    Neither the name of Andy Moncsek, inc. nor the names of its contributors may be used to endorse or
+ *    promote products derived from this software without specific prior written permission.
  *
- ************************************************************************/
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
 package org.jacp.chat.components;
 
 import javafx.event.ActionEvent;