Package com.dragome.remote

Examples of com.dragome.remote.TimeCollector


  }

  public TimeCollector getTimeCollector()
  {
    if (timeCollector == null)
      timeCollector= new TimeCollector();

    return timeCollector;
  }
View Full Code Here


  }

  public TimeCollector getTimeCollector()
  {
    if (timeCollector == null)
      timeCollector= new TimeCollector();

    return timeCollector;
  }
View Full Code Here

public final class MethodFactory implements ObjectFactory
{
  public Object instantiate(ObjectBinder context, Object value, Type targetType, Class targetClass)
  {
    TimeCollector timeCollector= ServiceLocator.getInstance().getTimeCollector();
    timeCollector.registerStart("instantiate method");

    String methodSignature= (String) value;
    String className= methodSignature.substring(0, methodSignature.lastIndexOf("."));
    String methodName= methodSignature.substring(methodSignature.lastIndexOf(".") + 1, methodSignature.lastIndexOf(":"));
    int parametersCount= Integer.parseInt(methodSignature.substring(methodSignature.lastIndexOf(":") + 1));
    try
    {
      Method[] methods= Class.forName(className).getMethods();
      for (Method method : methods)
      {
        if (method.getName().equals(methodName) && method.getParameterTypes().length == parametersCount)
          return method;
      }
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
    finally
    {
      timeCollector.registerEnd();
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of com.dragome.remote.TimeCollector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.