src/main/java/org/jboss/util/threadpool/BlockingMode.java
public static final BlockingMode toBlockingMode(String name)
   {
      BlockingMode mode = null;
      if( name == null )
      {
         mode = null;
      }
      else if( name.equalsIgnoreCase("run") )
      {
         mode = RUN;
      }
      else if( name.equalsIgnoreCase("wait") )
      {
         mode = WAIT;
      }
      else if( name.equalsIgnoreCase("discard") )
      {
         mode = DISCARD;
      }
      else if( name.equalsIgnoreCase("discardOldest") )
      {
         mode = DISCARD_OLDEST;
      }
      else if( name.equalsIgnoreCase("abort") )
      {
         mode = ABORT;
      }
      return mode;
   }
public static final BlockingMode toBlockingMode(String name)
   {
      BlockingMode mode = null;
      if( name == null )
      {
         mode = null;
      }
      else if( name.equalsIgnoreCase("run") )
      {
         mode = RUN;
      }
      else if( name.equalsIgnoreCase("wait") )
      {
         mode = WAIT;
      }
      else if( name.equalsIgnoreCase("discard") )
      {
         mode = DISCARD;
      }
      else if( name.equalsIgnoreCase("discardOldest") )
      {
         mode = DISCARD_OLDEST;
      }
      else if( name.equalsIgnoreCase("abort") )
      {
         mode = ABORT;
      }
      return mode;
   }
public static final BlockingMode toBlockingMode ( String name ) { BlockingMode mode = null ; if ( name == null ) { mode = null ; } else if ( name . equalsIgnoreCase ( "run" ) ) { mode = RUN ; } else if ( name . equalsIgnoreCase ( "wait" ) ) { mode = WAIT ; } else if ( name . equalsIgnoreCase ( "discard" ) ) { mode = DISCARD ; } else if ( name . equalsIgnoreCase ( "discardOldest" ) ) { mode = DISCARD_OLDEST ; } else if ( name . equalsIgnoreCase ( "abort" ) ) { mode = ABORT ; } return mode ; }
A utility method to convert a string name to a BlockingMode
@param name
@return The associated BlockingMode constant if name is valid, null otherwise
A utility method to convert a string name to a BlockingMode