private void validateStateTransition(SleeState oldState, SleeState newState)
			throws InvalidStateException {
		if (oldState == SleeState.STOPPED) {
			if (newState == SleeState.STARTING) {
				return;
			}		
		} else if (oldState == SleeState.STARTING) {
			if (newState == SleeState.RUNNING || newState == SleeState.STOPPING) {
				return;
			}
		} else if (oldState == SleeState.RUNNING) {
			if (newState == SleeState.STOPPING) {
				return;
			}
		} else if (oldState == SleeState.STOPPING) {
			if (newState == SleeState.STOPPED) {
				return;
			}
		}
		throw new InvalidStateException("illegal slee state transition: " + oldState + " -> "+ newState);
	}
private void validateStateTransition(SleeState oldState, SleeState newState)
			throws InvalidStateException {
		if (oldState == SleeState.STOPPED) {
			if (newState == SleeState.STARTING) {
				return;
			}		
		} else if (oldState == SleeState.STARTING) {
			if (newState == SleeState.RUNNING || newState == SleeState.STOPPING) {
				return;
			}
		} else if (oldState == SleeState.RUNNING) {
			if (newState == SleeState.STOPPING) {
				return;
			}
		} else if (oldState == SleeState.STOPPING) {
			if (newState == SleeState.STOPPED) {
				return;
			}
		}
		throw new InvalidStateException("illegal slee state transition: " + oldState + " -> "+ newState);
	}
private void validateStateTransition ( SleeState oldState , SleeState newState ) throws InvalidStateException { if ( oldState == SleeState . STOPPED ) { if ( newState == SleeState . STARTING ) { return ; } } else if ( oldState == SleeState . STARTING ) { if ( newState == SleeState . RUNNING || newState == SleeState . STOPPING ) { return ; } } else if ( oldState == SleeState . RUNNING ) { if ( newState == SleeState . STOPPING ) { return ; } } else if ( oldState == SleeState . STOPPING ) { if ( newState == SleeState . STOPPED ) { return ; } } throw new InvalidStateException ( "illegal slee state transition: " + oldState + " -> " + newState ) ; }
Ensures the standard SLEE lifecycle.

@param oldState
@param newState
@throws InvalidStateException
Ensures the standard SLEE lifecycle .