Suspends processing of this frame.
()
| 842 | * Suspends processing of this frame. |
| 843 | */ |
| 844 | public void suspend() { |
| 845 | while (true) { |
| 846 | switch (readState) { |
| 847 | case WAITING: |
| 848 | if (!READ_STATE_UPDATER.compareAndSet(this, ReadState.WAITING, ReadState.SUSPENDING_WAIT)) { |
| 849 | continue; |
| 850 | } |
| 851 | return; |
| 852 | case PROCESSING: |
| 853 | if (!READ_STATE_UPDATER.compareAndSet(this, ReadState.PROCESSING, ReadState.SUSPENDING_PROCESS)) { |
| 854 | continue; |
| 855 | } |
| 856 | return; |
| 857 | case SUSPENDING_WAIT: |
| 858 | if (readState != ReadState.SUSPENDING_WAIT) { |
| 859 | continue; |
| 860 | } else { |
| 861 | if (getLog().isWarnEnabled()) { |
| 862 | getLog().warn(sm.getString("wsFrame.suspendRequested")); |
| 863 | } |
| 864 | } |
| 865 | return; |
| 866 | case SUSPENDING_PROCESS: |
| 867 | if (readState != ReadState.SUSPENDING_PROCESS) { |
| 868 | continue; |
| 869 | } else { |
| 870 | if (getLog().isWarnEnabled()) { |
| 871 | getLog().warn(sm.getString("wsFrame.suspendRequested")); |
| 872 | } |
| 873 | } |
| 874 | return; |
| 875 | case SUSPENDED: |
| 876 | if (readState != ReadState.SUSPENDED) { |
| 877 | continue; |
| 878 | } else { |
| 879 | if (getLog().isWarnEnabled()) { |
| 880 | getLog().warn(sm.getString("wsFrame.alreadySuspended")); |
| 881 | } |
| 882 | } |
| 883 | return; |
| 884 | case CLOSING: |
| 885 | return; |
| 886 | default: |
| 887 | throw new IllegalStateException(sm.getString("wsFrame.illegalReadState", state)); |
| 888 | } |
| 889 | } |
| 890 | } |
| 891 | |
| 892 | /** |
| 893 | * Resumes processing of this frame after suspension. |
nothing calls this directly
no test coverage detected