MCPcopy Create free account
hub / github.com/apache/tomcat / resume

Method resume

java/org/apache/tomcat/websocket/WsFrameBase.java:895–938  ·  view source on GitHub ↗

Resumes processing of this frame after suspension.

()

Source from the content-addressed store, hash-verified

893 * Resumes processing of this frame after suspension.
894 */
895 public void resume() {
896 while (true) {
897 switch (readState) {
898 case WAITING:
899 if (readState != ReadState.WAITING) {
900 continue;
901 } else {
902 if (getLog().isWarnEnabled()) {
903 getLog().warn(sm.getString("wsFrame.alreadyResumed"));
904 }
905 }
906 return;
907 case PROCESSING:
908 if (readState != ReadState.PROCESSING) {
909 continue;
910 } else {
911 if (getLog().isWarnEnabled()) {
912 getLog().warn(sm.getString("wsFrame.alreadyResumed"));
913 }
914 }
915 return;
916 case SUSPENDING_WAIT:
917 if (!READ_STATE_UPDATER.compareAndSet(this, ReadState.SUSPENDING_WAIT, ReadState.WAITING)) {
918 continue;
919 }
920 return;
921 case SUSPENDING_PROCESS:
922 if (!READ_STATE_UPDATER.compareAndSet(this, ReadState.SUSPENDING_PROCESS, ReadState.PROCESSING)) {
923 continue;
924 }
925 return;
926 case SUSPENDED:
927 if (!READ_STATE_UPDATER.compareAndSet(this, ReadState.SUSPENDED, ReadState.WAITING)) {
928 continue;
929 }
930 resumeProcessing();
931 return;
932 case CLOSING:
933 return;
934 default:
935 throw new IllegalStateException(sm.getString("wsFrame.illegalReadState", state));
936 }
937 }
938 }
939
940 /**
941 * Returns whether this frame is currently suspended.

Callers

nothing calls this directly

Calls 5

getLogMethod · 0.95
resumeProcessingMethod · 0.95
isWarnEnabledMethod · 0.65
warnMethod · 0.65
getStringMethod · 0.65

Tested by

no test coverage detected