Skip to content

Commit

Permalink
Modify the logic for determining outbound traffic based on applicatio…
Browse files Browse the repository at this point in the history
…n state
  • Loading branch information
hexiaofeng committed May 24, 2024
1 parent 9365628 commit ece28bf
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
public enum AppStatus {

/**
* The application is in the process of starting. It cannot accept inbound requests or perform outbound operations.
* The application is in the process of starting. It cannot accept inbound requests.
*/
STARTING,

Expand All @@ -35,22 +35,22 @@ public enum AppStatus {
public boolean inbound() {
return true;
}

@Override
public boolean outbound() {
return true;
}
},

/**
* The application is in the process of shutting down. It cannot accept inbound requests or perform outbound operations.
* The application is in the process of shutting down. It cannot accept new inbound requests.
*/
DESTROYING,

/**
* The application has been shut down and is no longer operational. It cannot accept inbound requests or perform outbound operations.
*/
DESTROYED;
DESTROYED {
@Override
public boolean outbound() {
return false;
}
};

/**
* Determines if the application in its current state can accept inbound requests.
Expand All @@ -75,7 +75,7 @@ public boolean inbound() {
* @return {@code true} if the application can perform outbound operations in the current state; {@code false} otherwise.
*/
public boolean outbound() {
return false;
return true;
}

/**
Expand Down

0 comments on commit ece28bf

Please sign in to comment.