org.eclipse.jetty.webapp.WebAppContext.loadClass()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(7.2k)|赞(0)|评价(0)|浏览(150)

本文整理了Java中org.eclipse.jetty.webapp.WebAppContext.loadClass()方法的一些代码示例,展示了WebAppContext.loadClass()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.loadClass()方法的具体详情如下:
包路径:org.eclipse.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:loadClass

WebAppContext.loadClass介绍

暂无

代码示例

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

public void visitListener (WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{
  String className=node.getString("listener-class",false,true);
  if (LOG.isDebugEnabled())
    LOG.debug("listener="+className);
  try
  {
    Class<?> listenerClass = context.loadClass(className);
    EventListener l = (EventListener)listenerClass.newInstance();
    _listeners.add(l);
  }
  catch(Exception e)
  {
    LOG.warn("Could not instantiate listener "+className+": "+e);
    LOG.debug(e);
  }
  catch(Error e)
  {
    LOG.warn("Could not instantiate listener "+className+": "+e);
    LOG.debug(e);
  }
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp

public void visitListener (WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{     
  String className=node.getString("listener-class",false,true);
  if (LOG.isDebugEnabled()) 
    LOG.debug("listener="+className);
  try
  {
    Class<?> listenerClass = context.loadClass(className);
    EventListener l = (EventListener)listenerClass.newInstance();
    _listeners.add(l);
  }
  catch(Exception e)
  {
    LOG.warn("Could not instantiate listener "+className+": "+e);
    LOG.debug(e);
  }
  catch(Error e)
  {
    LOG.warn("Could not instantiate listener "+className+": "+e);
    LOG.debug(e);
  }
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus

public void visitListener (WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{     
  String className=node.getString("listener-class",false,true);
  if (LOG.isDebugEnabled()) 
    LOG.debug("listener="+className);
  try
  {
    Class<?> listenerClass = context.loadClass(className);
    EventListener l = (EventListener)listenerClass.newInstance();
    _listeners.add(l);
  }
  catch(Exception e)
  {
    LOG.warn("Could not instantiate listener "+className+": "+e);
    LOG.debug(e);
  }
  catch(Error e)
  {
    LOG.warn("Could not instantiate listener "+className+": "+e);
    LOG.debug(e);
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

public void visitListener (WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{
  String className=node.getString("listener-class",false,true);
  if (LOG.isDebugEnabled())
    LOG.debug("listener="+className);
  try
  {
    Class<?> listenerClass = context.loadClass(className);
    EventListener l = (EventListener)listenerClass.newInstance();
    _listeners.add(l);
  }
  catch(Exception e)
  {
    LOG.warn("Could not instantiate listener "+className+": "+e);
    LOG.debug(e);
  }
  catch(Error e)
  {
    LOG.warn("Could not instantiate listener "+className+": "+e);
    LOG.debug(e);
  }
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

public void visitListener (WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{     
  String className=node.getString("listener-class",false,true);
  if (LOG.isDebugEnabled()) 
    LOG.debug("listener="+className);
  try
  {
    Class<?> listenerClass = context.loadClass(className);
    EventListener l = (EventListener)listenerClass.newInstance();
    _listeners.add(l);
  }
  catch(Exception e)
  {
    LOG.warn("Could not instantiate listener "+className+": "+e);
    LOG.debug(e);
  }
  catch(Error e)
  {
    LOG.warn("Could not instantiate listener "+className+": "+e);
    LOG.debug(e);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

Class<? extends EventListener> listenerClass = (Class<? extends EventListener>)context.loadClass(className);
listener = newListenerInstance(context,listenerClass);
if (!(listener instanceof EventListener))

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

Class<? extends EventListener> listenerClass = (Class<? extends EventListener>)context.loadClass(className);
listener = newListenerInstance(context,listenerClass);
if (!(listener instanceof EventListener))

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

Class<? extends EventListener> listenerClass = (Class<? extends EventListener>)context.loadClass(className);
listener = newListenerInstance(context,listenerClass);
if (!(listener instanceof EventListener))

代码示例来源:origin: jenkinsci/winstone

Class<? extends EventListener> listenerClass = (Class<? extends EventListener>)context.loadClass(className);
listener = newListenerInstance(context,listenerClass, descriptor);
if (!(listener instanceof EventListener))

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp

Class<? extends EventListener> listenerClass = (Class<? extends EventListener>)context.loadClass(className);
listener = newListenerInstance(context,listenerClass);
if (!(listener instanceof EventListener))

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus

Class<? extends EventListener> listenerClass = (Class<? extends EventListener>)context.loadClass(className);
listener = newListenerInstance(context,listenerClass);
if (!(listener instanceof EventListener))

代码示例来源:origin: net.wetheinter/gwt-user

Class<? extends Servlet> clazz = wac.loadClass(servletClass).asSubclass(Servlet.class);
wac.addServlet(clazz, path);
loadedServletsByPath.put(path, servletClass);

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

Class<? extends Servlet> clazz = wac.loadClass(servletClass).asSubclass(Servlet.class);
wac.addServlet(clazz, path);
loadedServletsByPath.put(path, servletClass);

代码示例来源:origin: org.eclipse.jetty/jetty-plus

try
  Class<?> clazz = context.loadClass(className);
  LifeCycleCallback callback = new PreDestroyCallback();
  callback.setTarget(clazz, methodName);
    Class<?> clazz = context.loadClass(className);
    LifeCycleCallback callback = new PreDestroyCallback();
    callback.setTarget(clazz, methodName);
  Class<?> clazz = context.loadClass(className);
  LifeCycleCallback callback = new PreDestroyCallback();
  callback.setTarget(clazz, methodName);

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

try
  Class<?> clazz = context.loadClass(className);
  LifeCycleCallback callback = new PreDestroyCallback();
  callback.setTarget(clazz, methodName);
    Class<?> clazz = context.loadClass(className);
    LifeCycleCallback callback = new PreDestroyCallback();
    callback.setTarget(clazz, methodName);
  Class<?> clazz = context.loadClass(className);
  LifeCycleCallback callback = new PreDestroyCallback();
  callback.setTarget(clazz, methodName);

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

Class<?> clazz = context.loadClass(targetClassName);
Injection injection = new Injection();
injection.setJndiName(jndiName);

代码示例来源:origin: org.eclipse.jetty/jetty-plus

Class<?> clazz = context.loadClass(targetClassName);
Injection injection = new Injection();
injection.setJndiName(jndiName);

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

Class<?> clazz = context.loadClass(targetClassName);
Injection injection = new Injection();
injection.setJndiName(jndiName);

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus

Class<?> clazz = context.loadClass(targetClassName);
Injection injection = new Injection();
injection.setJndiName(jndiName);

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

Class<?> clazz = context.loadClass(targetClassName);
Injection injection = new Injection();
injection.setJndiName(jndiName);

相关文章

WebAppContext类方法