use of org.jboss.resteasy.plugins.server.netty.NettyJaxrsServer in project narayana by jbosstm.
the class VolatileParticipantResourceTestCase method beforeClass.
@BeforeClass
public static void beforeClass() {
List<String> resourceClasses = new ArrayList<String>();
resourceClasses.add("org.jboss.narayana.rest.integration.VolatileParticipantResource");
ResteasyDeployment resteasyDeployment = new ResteasyDeployment();
resteasyDeployment.setResourceClasses(resourceClasses);
NETTY = new NettyJaxrsServer();
NETTY.setDeployment(resteasyDeployment);
NETTY.setPort(TestPortProvider.getPort());
NETTY.start();
}
use of org.jboss.resteasy.plugins.server.netty.NettyJaxrsServer in project narayana by jbosstm.
the class ParticipantResourceTestCase method beforeClass.
@BeforeClass
public static void beforeClass() {
List<String> resourceClasses = new ArrayList<String>();
resourceClasses.add("org.jboss.narayana.rest.integration.ParticipantResource");
ResteasyDeployment resteasyDeployment = new ResteasyDeployment();
resteasyDeployment.setResourceClasses(resourceClasses);
NETTY = new NettyJaxrsServer();
NETTY.setDeployment(resteasyDeployment);
NETTY.setPort(TestPortProvider.getPort());
NETTY.start();
}
use of org.jboss.resteasy.plugins.server.netty.NettyJaxrsServer in project camunda-bpm-platform by camunda.
the class ResteasyServerBootstrap method setupServer.
private void setupServer(Application application) {
Properties serverProperties = readProperties();
int port = Integer.parseInt(serverProperties.getProperty(PORT_PROPERTY));
server = new NettyJaxrsServer();
server.setRootResourcePath(ROOT_RESOURCE_PATH);
server.setPort(port);
server.getDeployment().setApplication(application);
}
use of org.jboss.resteasy.plugins.server.netty.NettyJaxrsServer in project motan by weibocom.
the class NettyEndpointFactory method innerCreateServer.
@Override
protected RestServer innerCreateServer(URL url) {
NettyJaxrsServer server = new NettyJaxrsServer();
server.setMaxRequestSize(url.getIntParameter(URLParamType.maxContentLength.getName(), URLParamType.maxContentLength.getIntValue()));
ResteasyDeployment deployment = new ResteasyDeployment();
server.setDeployment(deployment);
server.setExecutorThreadCount(url.getIntParameter(URLParamType.maxWorkerThread.getName(), URLParamType.maxWorkerThread.getIntValue()));
server.setPort(url.getPort());
server.setRootResourcePath("");
server.setSecurityDomain(null);
deployment.setInjectorFactoryClass(RestfulInjectorFactory.class.getName());
deployment.getProviderClasses().add(RpcExceptionMapper.class.getName());
return new EmbedRestServer(server);
}
Aggregations