Class Utils

java.lang.Object
org.glassfish.grizzly.config.Utils

public class Utils extends Object
Created Dec 18, 2008
Author:
Justin Lee
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • getServiceLocator

      public static org.glassfish.hk2.api.ServiceLocator getServiceLocator(String fileURL)
    • getServiceLocator

      public static org.glassfish.hk2.api.ServiceLocator getServiceLocator(InputStream inputStream, String name)
    • getNewServiceLocator

      public static org.glassfish.hk2.api.ServiceLocator getNewServiceLocator(String name)
    • composeThreadPoolName

      public static String composeThreadPoolName(NetworkListener networkListener)
    • newInstance

      public static <E> E newInstance(org.glassfish.hk2.api.ServiceLocator habitat, Class<E> clazz, String name, String realClassName)
      Load or create an Object with the specific service name and class name.
      Parameters:
      habitat - the HK2 ServiceLocator
      clazz - the class as mapped within the ServiceLocator
      name - the service name
      realClassName - the class name of the service
      Returns:
      a service matching based on name and realClassName input arguments.
    • newInstance

      public static <E> E newInstance(org.glassfish.hk2.api.ServiceLocator habitat, Class<E> clazz, String name, String realClassName, Class<?>[] argTypes, Object[] args)
      Load or create an Object with the specific service name and class name.
      Parameters:
      habitat - the HK2 ServiceLocator
      clazz - the class as mapped within the ServiceLocator
      name - the service name
      realClassName - the class name of the service
      Returns:
      a service matching based on name and realClassName input arguments.
    • newInstance

      public static Object newInstance(String classname) throws Exception
      Throws:
      Exception
    • newInstance

      public static Object newInstance(String classname, Class<?>[] argTypes, Object[] args) throws Exception
      Throws:
      Exception
    • loadClass

      public static Class loadClass(String classname) throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • isDebugVM

      public static boolean isDebugVM()