001/** 002 * ControlIntention.java 003 * 004 * Copyright (c) 2004-2012, Nicole C. Tedesco. All rights reserved. 005 * 006 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 007 * use this file except in compliance with the License. You may obtain a copy of 008 * the License at: 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 014 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 015 * License for the specific language governing permissions and limitations under 016 * the License. 017 */ 018 019package net.sf.jaccumulator; 020 021/** 022 * Communicate a general control intention outside of the current state 023 * processor 024 * 025 * @since JAccumulator 4.0 026 * @author Nicole Tedesco (<a 027 * href="mailto:nicole@tedesco.name">nicole@tedesco.name</a>) 028 */ 029public enum ControlIntention 030{ 031 /** 032 * The current control flow has not yet completed, but the most recent event 033 * has <i>not</i> been ignored and in fact has probably been buffered. 034 * Future calls are encouraged. 035 */ 036 CONTINUE, 037 038 /** 039 * The current control flow has completed successfully and the state model 040 * has reached the end of a terminal control flow. Final results are 041 * available and the state model requires a reset before additional 042 * processing can continue. 043 */ 044 DONE, 045 046 /** 047 * An unexpected state has been reached that lies is outside of the state 048 * model's design specification. Future calls are discouraged. 049 */ 050 EXCEPTION, 051 052 /** 053 * A current control flow has completed with a controlled rejection of 054 * input; an input was not appropriate, but was within design parameters for 055 * the state model. Future calls should be avoided until the state model has 056 * been reset. 057 */ 058 FAIL, 059 060 /** 061 * A current control flow has not advanced and the input was rejected. 062 * Future calls however, are encouraged. 063 */ 064 REJECT, 065 066 /** 067 * The current control flow has completed successfully and the state model 068 * is ready for additional events. Future calls are encouraged. 069 */ 070 SUCCESS, 071 072 /** 073 * No control intention has been explicitly identified; don't care. Future 074 * calls are neither encouraged or discouraged. 075 */ 076 UNKNOWN, 077 078 /** 079 * A current control flow has not yet completed, but the most recent event 080 * may have been ignored. Future calls are encouraged to drain internal 081 * event queues. 082 */ 083 WAIT, 084}