Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,56 +41,15 @@
import com.ibm.wsspi.kernel.service.utils.MetatypeUtils;
import com.ibm.wsspi.kernel.service.utils.OnErrorUtil.OnError;

import io.openliberty.http.ext.BaseChain;

/**
* Encapsulation of steps for starting/stopping an http chain in a controlled/predictable
* manner with a minimum of synchronization.
*/
public class HttpChain implements ChainEventListener {
public class HttpChain extends BaseChain {
private static final TraceComponent tc = Tr.register(HttpChain.class);

public enum ChainState {
UNINITIALIZED(0, "UNINITIALIZED"),
DESTROYED(1, "DESTROYED"),
INITIALIZED(2, "INITIALIZED"),
STOPPED(3, "STOPPED"),
QUIESCED(4, "QUIESCED"),
STARTED(5, "STARTED"),
STARTING(6, "STARTING"),
STOPPING(7, "STOPPING");

public final int val;
final String name;

@Trivial
ChainState(int val, String name) {
this.val = val;
this.name = "name";
}

@Trivial
public static final String printState(int state) {
switch (state) {
case 0:
return "UNINITIALIZED";
case 1:
return "DESTROYED";
case 2:
return "INITIALIZED";
case 3:
return "STOPPED";
case 4:
return "QUIESCED";
case 5:
return "STARTED";
case 6:
return "STARTING";
case 7:
return "STOPPING";
}
return "UNKNOWN";
}
}

protected final StopWait stopWait = new StopWait();
protected final HttpEndpointImpl owner;
protected final boolean isHttps;
Expand Down
Loading