use of org.apache.cxf.transport.http.HTTPTransportFactory in project tomee by apache.
the class CxfRSService method beforeStart.
@Override
protected void beforeStart() {
super.beforeStart();
destinationFactory = new HTTPTransportFactory();
}
use of org.apache.cxf.transport.http.HTTPTransportFactory in project cxf by apache.
the class AtmosphereWebSocketJettyDestinationTest method testUseCXFDefaultAtmoosphereInterceptor.
@Test
public void testUseCXFDefaultAtmoosphereInterceptor() throws Exception {
Bus bus = new ExtensionManagerBus();
DestinationRegistry registry = new HTTPTransportFactory().getRegistry();
EndpointInfo endpoint = new EndpointInfo();
endpoint.setAddress(ENDPOINT_ADDRESS);
endpoint.setName(ENDPOINT_NAME);
AtmosphereWebSocketServletDestination dest = new AtmosphereWebSocketServletDestination(bus, registry, endpoint, ENDPOINT_ADDRESS);
List<AtmosphereInterceptor> ais = dest.getAtmosphereFramework().interceptors();
int added = 0;
for (AtmosphereInterceptor a : ais) {
if (DefaultProtocolInterceptor.class.equals(a.getClass())) {
added++;
break;
}
}
assertEquals(1, added);
}
use of org.apache.cxf.transport.http.HTTPTransportFactory in project cxf by apache.
the class AtmosphereWebSocketJettyDestinationTest method testUseCustomAtmoosphereInterceptor.
@Test
public void testUseCustomAtmoosphereInterceptor() throws Exception {
Bus bus = new ExtensionManagerBus();
bus.setProperty("atmosphere.interceptors", new CustomInterceptor1());
DestinationRegistry registry = new HTTPTransportFactory().getRegistry();
EndpointInfo endpoint = new EndpointInfo();
endpoint.setAddress(ENDPOINT_ADDRESS);
endpoint.setName(ENDPOINT_NAME);
AtmosphereWebSocketServletDestination dest = new AtmosphereWebSocketServletDestination(bus, registry, endpoint, ENDPOINT_ADDRESS);
List<AtmosphereInterceptor> ais = dest.getAtmosphereFramework().interceptors();
int added = 0;
for (AtmosphereInterceptor a : ais) {
if (CustomInterceptor1.class.equals(a.getClass())) {
added++;
break;
}
}
assertEquals(1, added);
}
use of org.apache.cxf.transport.http.HTTPTransportFactory in project cxf by apache.
the class AtmosphereWebSocketServletDestinationTest method testUseCXFDefaultAtmoosphereInterceptor.
@Test
public void testUseCXFDefaultAtmoosphereInterceptor() throws Exception {
Bus bus = new ExtensionManagerBus();
DestinationRegistry registry = new HTTPTransportFactory().getRegistry();
EndpointInfo endpoint = new EndpointInfo();
endpoint.setAddress(ENDPOINT_ADDRESS);
endpoint.setName(ENDPOINT_NAME);
AtmosphereWebSocketServletDestination dest = new AtmosphereWebSocketServletDestination(bus, registry, endpoint, ENDPOINT_ADDRESS);
List<AtmosphereInterceptor> ais = dest.getAtmosphereFramework().interceptors();
int added = 0;
for (AtmosphereInterceptor a : ais) {
if (DefaultProtocolInterceptor.class.equals(a.getClass())) {
added++;
break;
}
}
assertEquals(1, added);
}
use of org.apache.cxf.transport.http.HTTPTransportFactory in project cxf by apache.
the class AtmosphereWebSocketServletDestinationTest method testUseCustomAtmoosphereInterceptor.
@Test
public void testUseCustomAtmoosphereInterceptor() throws Exception {
Bus bus = new ExtensionManagerBus();
bus.setProperty("atmosphere.interceptors", new CustomInterceptor1());
DestinationRegistry registry = new HTTPTransportFactory().getRegistry();
EndpointInfo endpoint = new EndpointInfo();
endpoint.setAddress(ENDPOINT_ADDRESS);
endpoint.setName(ENDPOINT_NAME);
AtmosphereWebSocketServletDestination dest = new AtmosphereWebSocketServletDestination(bus, registry, endpoint, ENDPOINT_ADDRESS);
List<AtmosphereInterceptor> ais = dest.getAtmosphereFramework().interceptors();
int added = 0;
for (AtmosphereInterceptor a : ais) {
if (CustomInterceptor1.class.equals(a.getClass())) {
added++;
break;
}
}
assertEquals(1, added);
}
Aggregations