-
Notifications
You must be signed in to change notification settings - Fork 629
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Log improvements for Websocket/GraphQL subscription throttling
- Loading branch information
1 parent
4792184
commit 8275885
Showing
9 changed files
with
174 additions
and
11 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...teway/src/main/java/org/wso2/carbon/apimgt/gateway/dto/InboundProcessorResponseError.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,25 @@ | ||
/* | ||
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. | ||
* | ||
* WSO2 LLC. licenses this file to you 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 | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* 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. | ||
*/ | ||
|
||
package org.wso2.carbon.apimgt.gateway.dto; | ||
|
||
/** | ||
* Interface for defining inbound response error information | ||
*/ | ||
public interface InboundProcessorResponseError { | ||
} |
77 changes: 77 additions & 0 deletions
77
...ateway/src/main/java/org/wso2/carbon/apimgt/gateway/dto/WebSocketThrottleResponseDTO.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,77 @@ | ||
/* | ||
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.org) All Rights Reserved. | ||
* | ||
* WSO2 LLC. licenses this file to you 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 | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* 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. | ||
*/ | ||
|
||
package org.wso2.carbon.apimgt.gateway.dto; | ||
|
||
/** | ||
* DTO class which holds information on throttle response of websocket frames. | ||
*/ | ||
public class WebSocketThrottleResponseDTO implements InboundProcessorResponseError { | ||
|
||
private boolean isThrottled; | ||
private String throttledOutReason; | ||
private String apiContext; | ||
private String user; | ||
|
||
public WebSocketThrottleResponseDTO() { | ||
} | ||
|
||
public WebSocketThrottleResponseDTO(boolean throttled, String throttledOutReason) { | ||
isThrottled = throttled; | ||
this.throttledOutReason = throttledOutReason; | ||
} | ||
|
||
public WebSocketThrottleResponseDTO(boolean throttled, String throttledOutReason, String apiContext, String user) { | ||
isThrottled = throttled; | ||
this.throttledOutReason = throttledOutReason; | ||
this.apiContext = apiContext; | ||
this.user = user; | ||
} | ||
|
||
public boolean isThrottled() { | ||
return isThrottled; | ||
} | ||
|
||
public void setThrottled(boolean throttled) { | ||
isThrottled = throttled; | ||
} | ||
|
||
public String getThrottledOutReason() { | ||
return throttledOutReason; | ||
} | ||
|
||
public void setThrottledOutReason(String throttledOutReason) { | ||
this.throttledOutReason = throttledOutReason; | ||
} | ||
|
||
public String getApiContext() { | ||
return apiContext; | ||
} | ||
|
||
public void setApiContext(String apiContext) { | ||
this.apiContext = apiContext; | ||
} | ||
|
||
public String getUser() { | ||
return user; | ||
} | ||
|
||
public void setUser(String user) { | ||
this.user = user; | ||
} | ||
} |
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
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