本文整理了Java中org.eclipse.jetty.server.Server.getBean()
方法的一些代码示例,展示了Server.getBean()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.getBean()
方法的具体详情如下:
包路径:org.eclipse.jetty.server.Server
类名称:Server
方法名:getBean
暂无
代码示例来源:origin: line/armeria
ArmeriaConnector(Server server) {
this.server = server;
executor = server.getThreadPool();
final HttpConfiguration httpConfig = server.getBean(HttpConfiguration.class);
this.httpConfig = httpConfig != null ? httpConfig : new HttpConfiguration();
final Scheduler scheduler = server.getBean(Scheduler.class);
this.scheduler = scheduler != null ? scheduler : new ScheduledExecutorScheduler();
final ByteBufferPool byteBufferPool = server.getBean(ByteBufferPool.class);
this.byteBufferPool = byteBufferPool != null ? byteBufferPool : new ArrayByteBufferPool();
addBean(server, false);
addBean(executor);
unmanage(executor);
addBean(this.httpConfig);
addBean(this.scheduler);
addBean(this.byteBufferPool);
connectionFactory = new ArmeriaConnectionFactory();
connectionFactories = Collections.singleton(connectionFactory);
}
代码示例来源:origin: org.eclipse.jetty/jetty-webapp
/** Get/Set/Create the server default Configuration ClassList.
* <p>Get the class list from: a Server bean; or the attribute (which can
* either be a ClassList instance or an String[] of class names); or a new instance
* with default configuration classes.</p>
* <p>This method also adds the obtained ClassList instance as a dependent bean
* on the server and clears the attribute</p>
* @param server The server the default is for
* @return the server default ClassList instance of the configuration classes for this server. Changes to this list will change the server default instance.
*/
public static ClassList setServerDefault(Server server)
{
ClassList cl=server.getBean(ClassList.class);
if (cl!=null)
return cl;
cl=serverDefault(server);
server.addBean(cl);
server.setAttribute(ATTR,null);
return cl;
}
代码示例来源:origin: org.eclipse.jetty/jetty-webapp
/** Get/Create the server default Configuration ClassList.
* <p>Get the class list from: a Server bean; or the attribute (which can
* either be a ClassList instance or an String[] of class names); or a new instance
* with default configuration classes.
* @param server The server the default is for
* @return A copy of the server default ClassList instance of the configuration classes for this server. Changes to the returned list will not change the server default.
*/
public static ClassList serverDefault(Server server)
{
ClassList cl=null;
if (server!=null)
{
cl= server.getBean(ClassList.class);
if (cl!=null)
return new ClassList(cl);
Object attr = server.getAttribute(ATTR);
if (attr instanceof ClassList)
return new ClassList((ClassList)attr);
if (attr instanceof String[])
return new ClassList((String[])attr);
}
return new ClassList();
}
代码示例来源:origin: org.eclipse.jetty/jetty-security
protected IdentityService findIdentityService()
{
return getServer().getBean(IdentityService.class);
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server
public static ErrorHandler getErrorHandler(Server server, ContextHandler context)
{
ErrorHandler error_handler=null;
if (context!=null)
error_handler=context.getErrorHandler();
if (error_handler==null && server!=null)
error_handler = server.getBean(ErrorHandler.class);
return error_handler;
}
}
代码示例来源:origin: Nextdoor/bender
public static ErrorHandler getErrorHandler(Server server, ContextHandler context)
{
ErrorHandler error_handler=null;
if (context!=null)
error_handler=context.getErrorHandler();
if (error_handler==null && server!=null)
error_handler = server.getBean(ErrorHandler.class);
return error_handler;
}
}
代码示例来源:origin: jenkinsci/winstone
public static ErrorHandler getErrorHandler(Server server, ContextHandler context)
{
ErrorHandler error_handler=null;
if (context!=null)
error_handler=context.getErrorHandler();
if (error_handler==null && server!=null)
error_handler = server.getBean(ErrorHandler.class);
return error_handler;
}
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
protected IdentityService findIdentityService()
{
return getServer().getBean(IdentityService.class);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
protected IdentityService findIdentityService()
{
return getServer().getBean(IdentityService.class);
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
protected IdentityService findIdentityService()
{
return getServer().getBean(IdentityService.class);
}
代码示例来源:origin: org.eclipse.jetty/security
protected IdentityService findIdentityService()
{
return getServer().getBean(IdentityService.class);
}
代码示例来源:origin: Nextdoor/bender
protected IdentityService findIdentityService()
{
return getServer().getBean(IdentityService.class);
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.security
protected IdentityService findIdentityService()
{
return getServer().getBean(IdentityService.class);
}
代码示例来源:origin: cn.home1/oss-lib-webmvc-spring-boot-1.4.2.RELEASE
@Override
public void customize(final Server server) {
final QueuedThreadPool threadPool = server.getBean(QueuedThreadPool.class);
threadPool.setMaxThreads(Integer.parseInt(this.maxThreads));
threadPool.setMinThreads(Integer.parseInt(this.minThreads));
threadPool.setIdleTimeout(Integer.parseInt(this.idleTimeout));
}
代码示例来源:origin: cn.home1/oss-lib-webmvc-spring-boot-1.4.1.RELEASE
@Override
public void customize(final Server server) {
final QueuedThreadPool threadPool = server.getBean(QueuedThreadPool.class);
threadPool.setMaxThreads(Integer.parseInt(this.maxThreads));
threadPool.setMinThreads(Integer.parseInt(this.minThreads));
threadPool.setIdleTimeout(Integer.parseInt(this.idleTimeout));
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@Override
protected void doStart() throws Exception
{
_scheduler = _server.getBean(Scheduler.class);
if (_scheduler==null)
{
_scheduler=new LRMScheduler();
_scheduler.start();
}
super.doStart();
_scheduler.schedule(_monitor,_period,TimeUnit.MILLISECONDS);
}
代码示例来源:origin: Nextdoor/bender
@Override
protected void doStart() throws Exception
{
_scheduler = _server.getBean(Scheduler.class);
if (_scheduler==null)
{
_scheduler=new LRMScheduler();
_scheduler.start();
}
super.doStart();
_scheduler.schedule(_monitor,_period,TimeUnit.MILLISECONDS);
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server
@Override
protected void doStart() throws Exception
{
_scheduler = _server.getBean(Scheduler.class);
if (_scheduler==null)
{
_scheduler=new LRMScheduler();
_scheduler.start();
}
super.doStart();
_scheduler.schedule(_monitor,_period,TimeUnit.MILLISECONDS);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
@Override
protected void doStart() throws Exception
{
_scheduler = _server.getBean(Scheduler.class);
if (_scheduler==null)
{
_scheduler=new LRMScheduler();
_scheduler.start();
}
super.doStart();
_scheduler.schedule(_monitor,_period,TimeUnit.MILLISECONDS);
}
代码示例来源:origin: jenkinsci/winstone
@Override
protected void doStart() throws Exception
{
_scheduler = _server.getBean(Scheduler.class);
if (_scheduler==null)
{
_scheduler=new LRMScheduler();
_scheduler.start();
}
super.doStart();
_scheduler.schedule(_monitor,_period,TimeUnit.MILLISECONDS);
}
内容来源于网络,如有侵权,请联系作者删除!