* exception if it is every other state.
*
* @return void
- * @throws InvalidStateException If the state is not 'active'
+ * @throws InvalidStateException If the state is not 'active' and not 'announced'
*/
public function validateNodeStateIsActiveOrAnnounced () {
// Just compare it...
throw new InvalidStateException($this, self::EXCEPTION_INVALID_STATE);
} // END - if
}
+
+ /**
+ * Validates whether the state is 'active' or 'reachable' or throws an
+ * exception if it is every other state.
+ *
+ * @return void
+ * @throws InvalidStateException If the state is not 'active' and not 'reachable'
+ */
+ public function validateNodeStateIsActiveOrReachable () {
+ // Just compare it...
+ if ((!$this instanceof NodeActiveState) && (!$this instanceof NodeReachableState)) {
+ // Throw the exception
+ throw new InvalidStateException($this, self::EXCEPTION_INVALID_STATE);
+ } // END - if
+ }
}
// [EOF]