本文整理汇总了Java中restx.server.WebServer类的典型用法代码示例。如果您正苦于以下问题:Java WebServer类的具体用法?Java WebServer怎么用?Java WebServer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WebServer类属于restx.server包,在下文中一共展示了WebServer类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: main
import restx.server.WebServer; //导入依赖的package包/类
public static void main( String[] args ) throws Exception {
int port = Integer.valueOf( Optional.fromNullable( System.getenv( "PORT" ) ).or( "10043" ) );
WebServer server = new JettyWebServer( WEB_INF_LOCATION, WEB_APP_LOCATION, port, "0.0.0.0" );
/*
* load mode from system property if defined, or default to dev
* be careful with that setting, if you use this class to launch your server in production, make sure to launch
* it with -Drestx.mode=prod or change the default here
*/
System.setProperty( "restx.mode", System.getProperty( "restx.mode", "dev" ) );
System.setProperty( "restx.app.package", "com.formulasearchengine.backend.basex" );
String path = System.getProperty( "path" );
Server srv = null;
System.out.println("admin password is " + System.getProperty( "password" ));
try {
srv = new Server();
System.out.println( "importing data from " + path );
srv.importData( path );
} catch ( IOException e ) {
e.printStackTrace();
}
server.startAndAwait();
}
开发者ID:physikerwelt,项目名称:mathsearch-backend-basex,代码行数:24,代码来源:AppServer.java
示例2: main
import restx.server.WebServer; //导入依赖的package包/类
public static void main( String[] args ) throws Exception {
int port = Integer.valueOf( Optional.fromNullable( System.getenv( "PORT" ) ).or( "10043" ) );
WebServer server = new JettyWebServer( WEB_INF_LOCATION, WEB_APP_LOCATION, port, "0.0.0.0" );
/*
* load mode from system property if defined, or default to dev
* be careful with that setting, if you use this class to launch your server in production, make sure to launch
* it with -Drestx.mode=prod or change the default here
*/
System.setProperty( "restx.mode", System.getProperty( "restx.mode", "dev" ) );
System.setProperty( "restx.app.package", "com.formulasearchengine.backend.basex" );
String path = System.getProperty( "path" , System.getProperty( "defaultPath" ) );
Server srv = null;
System.out.println("admin password is " + System.getProperty( "password" , "mathosphere" ) );
try {
System.out.println( "importing data from " + path );
File f = new File( path );
srv = Server.getInstance();
srv.startup(f);
} catch ( IOException e ) {
e.printStackTrace();
}
server.startAndAwait();
}
开发者ID:ag-gipp,项目名称:mathosphere,代码行数:25,代码来源:AppServer.java
示例3: main
import restx.server.WebServer; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
/*
* load mode from system property if defined, or default to dev
* be careful with that setting, if you use this class to launch your server in production, make sure to launch
* it with -Drestx.mode=prod or change the default here
*/
String mode = System.getProperty("restx.mode", "dev");
System.setProperty("restx.mode", mode);
System.setProperty("restx.app.package", "com.vino");
int port = Integer.valueOf(Optional.fromNullable(System.getenv("PORT")).or("8080"));
WebServer server = new JettyWebServer(WEB_INF_LOCATION, WEB_APP_LOCATION, port, "0.0.0.0");
System.setProperty("restx.server.id", server.getServerId());
System.setProperty("restx.server.baseURL", server.baseUrl());
server.startAndAwait();
}
开发者ID:vinoApp,项目名称:vino,代码行数:19,代码来源:AppServer.java
示例4: main
import restx.server.WebServer; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
int port = Integer.valueOf(Optional.fromNullable(System.getenv("PORT")).or("9090"));
WebServer server = SimpleWebServer.builder().setRouterPath("").setPort(port).build();
EndpointManager.getEndpointManager().setDefaultEndpoint(new CoapEndpoint(new InetSocketAddress("2001:0470:cafe::38b2:cf50",23498)));
/*
* load mode from system property if defined, or default to prod
* when using this class to launch your server in development, launch it with -Drestx.mode=dev
*/
System.setProperty("restx.mode", System.getProperty("restx.mode", "prod"));
System.setProperty("restx.app.package", "dynamicserver");
server.startAndAwait();
System.out.println("VISIT " + server.baseUrl() + "/ for Semantics IDE");
}
开发者ID:mkovatsc,项目名称:iot-semantics,代码行数:16,代码来源:IDEServer.java
示例5: main
import restx.server.WebServer; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
int port = Integer.valueOf(Optional.fromNullable(System.getenv("PORT")).or("8081"));
WebServer server = new JettyWebServer(WEB_INF_LOCATION, WEB_APP_LOCATION, port, "0.0.0.0");
System.setProperty("restx.mode", "prod");
System.setProperty("restx.app.package", "hello");
BigReactorSimulator.init();
server.startAndAwait();
}
开发者ID:sidoh,项目名称:reactor_simulator,代码行数:11,代码来源:SimulatorServer.java
示例6: main
import restx.server.WebServer; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
int port = Integer.valueOf(Optional.fromNullable(System.getenv("PORT")).or("8080"));
WebServer server = new JettyWebServer(WEB_INF_LOCATION, WEB_APP_LOCATION, port, "0.0.0.0");
System.setProperty("restx.baseUri", server.baseUrl() + "/api");
server.startAndAwait();
}
开发者ID:GozerProject,项目名称:gozer,代码行数:8,代码来源:GozerServer.java
示例7: main
import restx.server.WebServer; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
int port = Integer.valueOf(Optional.fromNullable(System.getenv("PORT")).or("8080"));
WebServer server = new JettyWebServer(WEB_INF_LOCATION, WEB_APP_LOCATION, port, "0.0.0.0");
System.setProperty("restx.mode", System.getProperty("restx.mode", "prod"));
System.setProperty("restx.app.package", "fr.pilato.demo.legacysearch");
server.startAndAwait();
}
开发者ID:gammaliu,项目名称:mongo-elastic-demo,代码行数:11,代码来源:LegacySearchApp.java
注:本文中的restx.server.WebServer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论