本文整理了Java中org.restlet.Application.start()
方法的一些代码示例,展示了Application.start()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Application.start()
方法的具体详情如下:
包路径:org.restlet.Application
类名称:Application
方法名:start
[英]Starts the application then all the enabled associated services.
[中]启动应用程序,然后启动所有已启用的关联服务。
代码示例来源:origin: stackoverflow.com
public void runAnotherApp(Class<? extends Application> anotherAppClass) throws Exception {
Application app2 = anotherAppClass.newInstance();
Stage anotherStage = new Stage();
app2.start(anotherStage);
}
代码示例来源:origin: stackoverflow.com
private static void launchApplication1(final Class<? extends Application> appClass,
final Class<? extends Preloader> preloaderClass,
final String[] args) throws Exception {
//... Lots of stuff
// Eventually, on line 755:
currentPreloader.start(primaryStage);
// More things for cases where the previous start() call isn't appropriate
// Line 773:
final AtomicReference<Application> app = new AtomicReference<>();
// Line 790/791:
Constructor<? extends Application> c = appClass.getConstructor(); // Gets constructor for your class
app.set(c.newInstance()); // Creates a new instance of your class
// Line 803:
final Application theApp = app.get();
// Line 837:
theApp.start(primaryStage);
}
代码示例来源:origin: stackoverflow.com
Application app = new Main();
app.start(JmeContext.Type.Headless);
代码示例来源:origin: apache/attic-polygene-java
@Override
public synchronized void start()
throws Exception
{
setName( polygeneApplication.name() );
Series<Parameter> parameters = getContext().getParameters();
String mode = parameters.getFirstValue( "org.apache.polygene.runtime.mode" );
super.start();
getLogger().info( "RestApplication successfully started." );
}
代码示例来源:origin: com.noelios.restlet/com.noelios.restlet.ext.servlet
@Override
public void init() throws ServletException {
if ((getComponent() != null)) {
if ((getApplication() != null) && (getApplication().isStopped())) {
try {
getApplication().start();
} catch (Exception e) {
log("Error during the starting of the Restlet Application",
e);
}
}
}
}
代码示例来源:origin: org.restlet/org.restlet.ext.servlet
@Override
public void init() throws ServletException {
if ((getComponent() != null)) {
if ((getApplication() != null) && (getApplication().isStopped())) {
try {
getApplication().start();
} catch (Exception e) {
log("Error during the starting of the Restlet Application",
e);
}
}
}
}
代码示例来源:origin: org.restlet.osgi/org.restlet
application.start();
内容来源于网络,如有侵权,请联系作者删除!