本文整理汇总了Java中org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer.setPort方法的典型用法代码示例。如果您正苦于以下问题:Java TJWSEmbeddedJaxrsServer.setPort方法的具体用法?Java TJWSEmbeddedJaxrsServer.setPort怎么用?Java TJWSEmbeddedJaxrsServer.setPort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jboss.resteasy.plugins.server.tjws.TJWSEmbeddedJaxrsServer
的用法示例。
在下文中一共展示了TJWSEmbeddedJaxrsServer.setPort方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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;
}
示例6: 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));
}