code: public static final boolean isRequestTypeAvailable(RequestType type)
      {
          switch (type)
          {
          case SERVLET:
              return true;
  
          case ACTION:
          case RENDER:
              return _PORTLET_CONTEXT_CLASS != null;
  
          case RESOURCE:
          case EVENT:
              return _PORTLET_RENDER_REQUEST_CLASS != null;
  
          default:
              return false;
          }
      }
docs: Returns <code>true</code> if a particular class relating to the supplied
  request type is available on the current classpath or <code>false</code>
  if it is not.  This class assumes that all containers have a servlet type
  request available, but the portlet request types are all dependant on the
  portlet container being used.
  
  @param type the RequestType to test
  @return a boolean value of <code>true</code> if the container contains the
  request type in the classpath
  @since 2.0