-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #4148 - config for jetty specific settings with javax WebSockets (
#4295) * Issue #4148 - config for jetty specific settings with javax WebSockets * Make every jetty EndpointConfig implementation a wrapper * Remove BasicEndpointConfig and use Client or Server specific ones
- Loading branch information
1 parent
6f2ac51
commit ce6438c
Showing
31 changed files
with
648 additions
and
524 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
29 changes: 29 additions & 0 deletions
29
...ent/src/main/java/org/eclipse/jetty/websocket/javax/client/BasicClientEndpointConfig.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// ======================================================================== | ||
// Copyright (c) 1995-2019 Mort Bay Consulting Pty. Ltd. | ||
// ------------------------------------------------------------------------ | ||
// All rights reserved. This program and the accompanying materials | ||
// are made available under the terms of the Eclipse Public License v1.0 | ||
// and Apache License v2.0 which accompanies this distribution. | ||
// | ||
// The Eclipse Public License is available at | ||
// http://www.eclipse.org/legal/epl-v10.html | ||
// | ||
// The Apache License v2.0 is available at | ||
// http://www.opensource.org/licenses/apache2.0.php | ||
// | ||
// You may elect to redistribute this code under either of these licenses. | ||
// ======================================================================== | ||
// | ||
|
||
package org.eclipse.jetty.websocket.javax.client; | ||
|
||
import org.eclipse.jetty.websocket.javax.common.ClientEndpointConfigWrapper; | ||
|
||
public class BasicClientEndpointConfig extends ClientEndpointConfigWrapper | ||
{ | ||
public BasicClientEndpointConfig() | ||
{ | ||
init(Builder.create().configurator(EmptyConfigurator.INSTANCE).build()); | ||
} | ||
} |
84 changes: 0 additions & 84 deletions
84
...ent/src/main/java/org/eclipse/jetty/websocket/javax/client/EmptyClientEndpointConfig.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
61 changes: 61 additions & 0 deletions
61
...n/src/main/java/org/eclipse/jetty/websocket/javax/common/ClientEndpointConfigWrapper.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// | ||
// ======================================================================== | ||
// Copyright (c) 1995-2019 Mort Bay Consulting Pty. Ltd. | ||
// ------------------------------------------------------------------------ | ||
// All rights reserved. This program and the accompanying materials | ||
// are made available under the terms of the Eclipse Public License v1.0 | ||
// and Apache License v2.0 which accompanies this distribution. | ||
// | ||
// The Eclipse Public License is available at | ||
// http://www.eclipse.org/legal/epl-v10.html | ||
// | ||
// The Apache License v2.0 is available at | ||
// http://www.opensource.org/licenses/apache2.0.php | ||
// | ||
// You may elect to redistribute this code under either of these licenses. | ||
// ======================================================================== | ||
// | ||
|
||
package org.eclipse.jetty.websocket.javax.common; | ||
|
||
import java.util.List; | ||
import javax.websocket.ClientEndpointConfig; | ||
import javax.websocket.Extension; | ||
|
||
public class ClientEndpointConfigWrapper extends EndpointConfigWrapper implements ClientEndpointConfig | ||
{ | ||
private ClientEndpointConfig _endpointConfig; | ||
|
||
public ClientEndpointConfigWrapper() | ||
{ | ||
} | ||
|
||
public ClientEndpointConfigWrapper(ClientEndpointConfig endpointConfig) | ||
{ | ||
init(endpointConfig); | ||
} | ||
|
||
public void init(ClientEndpointConfig endpointConfig) | ||
{ | ||
_endpointConfig = endpointConfig; | ||
super.init(endpointConfig); | ||
} | ||
|
||
@Override | ||
public List<String> getPreferredSubprotocols() | ||
{ | ||
return _endpointConfig.getPreferredSubprotocols(); | ||
} | ||
|
||
@Override | ||
public List<Extension> getExtensions() | ||
{ | ||
return _endpointConfig.getExtensions(); | ||
} | ||
|
||
@Override | ||
public Configurator getConfigurator() | ||
{ | ||
return _endpointConfig.getConfigurator(); | ||
} | ||
} |
Oops, something went wrong.