本文整理了Java中org.mortbay.jetty.Server.setSendServerVersion()
方法的一些代码示例,展示了Server.setSendServerVersion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.setSendServerVersion()
方法的具体详情如下:
包路径:org.mortbay.jetty.Server
类名称:Server
方法名:setSendServerVersion
暂无
代码示例来源:origin: voldemort/voldemort
public static Context getJettyServer(String clusterXml,
String storesXml,
String storeName,
RequestFormatType requestFormat,
int port) throws Exception {
StoreRepository repository = getStores(storeName, clusterXml, storesXml);
// initialize servlet
Server server = new Server(port);
server.setSendServerVersion(false);
Context context = new Context(server, "/", Context.NO_SESSIONS);
RequestHandler handler = getSocketRequestHandlerFactory(clusterXml, storesXml, repository).getRequestHandler(requestFormat);
context.addServlet(new ServletHolder(new StoreServlet(handler)), "/stores");
server.start();
return context;
}
代码示例来源:origin: voldemort/voldemort
httpServer.setConnectors(new Connector[] { connector });
httpServer.setThreadPool(threadPool);
httpServer.setSendServerVersion(false);
httpServer.setSendDateHeader(false);
Context context = new Context(httpServer, "/", Context.NO_SESSIONS);
代码示例来源:origin: org.openrdf.sesame/sesame-http-server-standalone
public void setServerName(String name) {
if (name == null || name.trim().length() == 0) {
jetty.setSendServerVersion(false);
servlet.setServerName(null);
} else {
servlet.setServerName(name);
}
}
代码示例来源:origin: org.mortbay.jetty/jetty-servlet-tester
public ServletTester()
{
try
{
_server.setSendServerVersion(false);
_server.addConnector(_connector);
_server.addHandler(_context);
}
catch (Error e)
{
throw e;
}
catch (RuntimeException e)
{
throw e;
}
catch (Exception e)
{
throw new RuntimeException(e);
}
}
代码示例来源:origin: co.cask.hbase/hbase
server.setThreadPool(threadPool);
server.setSendServerVersion(false);
server.setSendDateHeader(false);
server.setStopAtShutdown(true);
代码示例来源:origin: org.apache.tuscany.sca/tuscany-host-jetty
server.setSendServerVersion(sendServerVersion);
server.start();
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
server.setSendServerVersion(sendServerVersion);
server.start();
代码示例来源:origin: com.github.sakserv/hadoop-mini-clusters-hbase
server.setThreadPool(threadPool);
server.setSendServerVersion(false);
server.setSendDateHeader(false);
server.setStopAtShutdown(true);
代码示例来源:origin: com.twitter.hraven/hraven-core
@Override
protected void startUp() throws Exception {
// setup the jetty config
ServletHolder sh = new ServletHolder(ServletContainer.class);
sh.setInitParameter("com.sun.jersey.config.property.packages", "com.twitter.hraven.rest");
sh.setInitParameter(JSONConfiguration.FEATURE_POJO_MAPPING, "true");
server = new Server();
Connector connector = new SelectChannelConnector();
connector.setPort(this.port);
connector.setHost(address);
server.addConnector(connector);
// TODO: in the future we may want to provide settings for the min and max threads
// Jetty sets the default max thread number to 250, if we don't set it.
//
QueuedThreadPool threadPool = new QueuedThreadPool();
server.setThreadPool(threadPool);
server.setSendServerVersion(false);
server.setSendDateHeader(false);
server.setStopAtShutdown(true);
// set up context
Context context = new Context(server, "/", Context.SESSIONS);
context.addServlet(sh, "/*");
// start server
server.start();
}
代码示例来源:origin: twitter/hraven
@Override
protected void startUp() throws Exception {
// setup the jetty config
ServletHolder sh = new ServletHolder(ServletContainer.class);
sh.setInitParameter("com.sun.jersey.config.property.packages", "com.twitter.hraven.rest");
sh.setInitParameter(JSONConfiguration.FEATURE_POJO_MAPPING, "true");
server = new Server();
Connector connector = new SelectChannelConnector();
connector.setPort(this.port);
connector.setHost(address);
server.addConnector(connector);
// TODO: in the future we may want to provide settings for the min and max threads
// Jetty sets the default max thread number to 250, if we don't set it.
//
QueuedThreadPool threadPool = new QueuedThreadPool();
server.setThreadPool(threadPool);
server.setSendServerVersion(false);
server.setSendDateHeader(false);
server.setStopAtShutdown(true);
// set up context
Context context = new Context(server, "/", Context.SESSIONS);
context.addServlet(sh, "/*");
// start server
server.start();
}
代码示例来源:origin: DirectProject/nhin-d
public synchronized static void startServices() throws Exception
{
if (server == null)
{
/*
* Setup the configuration service server
*/
server = new Server();
SocketConnector connector = new SocketConnector();
HTTPPort = AvailablePortFinder.getNextAvailable( 1024 );
connector.setPort(HTTPPort);
WebAppContext context = new WebAppContext("src/test/resources/webapp", "/");
server.setSendServerVersion(false);
server.addConnector(connector);
server.addHandler(context);
server.start();
txsServiceURL = "http://localhost:" + HTTPPort + "/";
}
}
代码示例来源:origin: org.mortbay.jetty/jetty-embedded
server.setSendServerVersion(true);
内容来源于网络,如有侵权,请联系作者删除!