Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use static exceptions for closing websocket flushers.
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
- Loading branch information
1 parent
b1c19c0
commit 657222f
Showing
5 changed files
with
62 additions
and
22 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
...main/java/org/eclipse/jetty/websocket/core/exception/SentinelWebSocketCloseException.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,32 @@ | ||
// | ||
// ======================================================================== | ||
// Copyright (c) 1995-2022 Mort Bay Consulting Pty Ltd and others. | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License v. 2.0 which is available at | ||
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// ======================================================================== | ||
// | ||
|
||
package org.eclipse.jetty.websocket.core.exception; | ||
|
||
/** | ||
* Suppressed exceptions are disabled for this implementation, | ||
* meaning calling {@link #addSuppressed(Throwable)} has no effect. | ||
* This means instances of {@link SentinelWebSocketCloseException} are suitable to be kept as static fields. | ||
*/ | ||
public class SentinelWebSocketCloseException extends Exception | ||
{ | ||
public SentinelWebSocketCloseException() | ||
{ | ||
this(null); | ||
} | ||
|
||
public SentinelWebSocketCloseException(String message) | ||
{ | ||
super(message, null, false, true); | ||
} | ||
} |
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