State state = container.getState(); if (state.isStopped()) { throw new SmartFrogLivenessException( "Application Server has stopped");
int s = state; switch(state) { case STATE_UNCONFIGURED: throw new SmartFrogLivenessException( "Component has not yet been configured"); case STATE_STARTING:   break;  case STATE_RUNNING: State cstate = container.getState(); if (cstate.isStopped()) { throw new SmartFrogLivenessException( "Application Server has stopped"); } break;  case STATE_TERMINATED: throw new SmartFrogLivenessException( "Application Server is terminated"); case STATE_FAILED:  throw new SmartFrogLivenessException( "Application Server failed");  default: throw new SmartFrogLivenessException("unknown state");
    public void sfPing(Object source)            throws SmartFrogLivenessException, RemoteException {        super.sfPing(source);        if (!started) {            throw new SmartFrogLivenessException(                    "Application Server not started");        }        State state = container.getState();        if (state.isStopped()) {            throw new SmartFrogLivenessException(                    "Application Server has stopped");        }    }