本文整理汇总了Java中org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer类的典型用法代码示例。如果您正苦于以下问题:Java TJWSEmbeddedJaxrsServer类的具体用法?Java TJWSEmbeddedJaxrsServer怎么用?Java TJWSEmbeddedJaxrsServer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TJWSEmbeddedJaxrsServer类属于org.jboss.resteasy.plugins.server.tjws包,在下文中一共展示了TJWSEmbeddedJaxrsServer类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: start
import org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer; //导入依赖的package包/类
private void start() throws IOException {
port = findFreePort();
server = new TJWSEmbeddedJaxrsServer();
server.setPort(port);
server.setBindAddress(bindAddress);
server.setSecurityDomain(securityDomain);
for (Object object : objects) {
if (object instanceof Application) {
server.getDeployment().setApplication((Application) object);
} else {
server.getDeployment().getResources().add(object);
}
}
for (Class resourceOrProvider : classes) {
if (Application.class.isAssignableFrom(resourceOrProvider)) {
server.getDeployment().setApplicationClass(resourceOrProvider.getName());
} else {
server.getDeployment().getProviderClasses().add(resourceOrProvider.getName());
}
}
server.start();
}
示例2: startServer
import org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer; //导入依赖的package包/类
@BeforeClass
public static void startServer() throws IOException, NoSuchFieldException, IllegalAccessException {
bypassProActiveLogger();
preventProActiveToChangeSecurityManager();
server = new TJWSEmbeddedJaxrsServer();
silentServerError();
port = findFreePort();
server.setPort(port);
server.setRootResourcePath("/");
server.start();
}
示例3: LocalTestServer
import org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer; //导入依赖的package包/类
public LocalTestServer(
@Nonnull final String version,
final int port) {
this.version = version;
this.port = port;
server = new TJWSEmbeddedJaxrsServer();
server.setPort(port);
}
示例4: LocalTestServer
import org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer; //导入依赖的package包/类
public LocalTestServer(@Nonnull final String config) {
this.config = config;
this.port = PORT;
server = new TJWSEmbeddedJaxrsServer();
server.setPort(port);
}
示例5: Server
import org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer; //导入依赖的package包/类
@Inject
public Server(@Nonnull final MavenProperties mavenProperties) {
this.mavenProperties = mavenProperties;
server = new TJWSEmbeddedJaxrsServer();
}
示例6: getJaxrsServer
import org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer; //导入依赖的package包/类
public TJWSEmbeddedJaxrsServer getJaxrsServer() {
return tjws;
}
示例7: getJaxrsServer
import org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer; //导入依赖的package包/类
TJWSEmbeddedJaxrsServer getJaxrsServer() {
return tjws;
}
示例8: startServer
import org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer; //导入依赖的package包/类
static TJWSEmbeddedJaxrsServer startServer()
{
TJWSEmbeddedJaxrsServer tjws = new TJWSEmbeddedJaxrsServer();
tjws.setPort(TCP_PORT_NUMBER);
RedHxServlet servlet = new RedHxServlet();
tjws.addServlet(HTTP_URL, servlet);
tjws.start();
return tjws;
}
示例9: init
import org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer; //导入依赖的package包/类
public void init() throws Exception {
configs = new PropertiesConfiguration("proxyapp.properties");
tjws = new TJWSEmbeddedJaxrsServer();
tjws.setBindAddress(configs.getString("bindaddress","localhost"));
tjws.setPort(configs.getInt("bindport",8080));
}