use of com.tvd12.ezyfoxserver.request.EzyStreamingRequest in project ezyfox-server by youngmonkeys.
the class EzyRawBytesInterceptorTest method test2.
@Test(expectedExceptions = EzyNotAuthorizedException.class)
public void test2() throws Exception {
EzyRawBytesInterceptor interceptor = new EzyRawBytesInterceptor();
EzyServerContext serverContext = mock(EzyServerContext.class);
EzyStreamingRequest request = new EzySimpleStreamingRequest();
interceptor.intercept(serverContext, request);
}
use of com.tvd12.ezyfoxserver.request.EzyStreamingRequest in project ezyfox-server by youngmonkeys.
the class EzySimpleDataHandler method doHandleReceivedStreaming.
@SuppressWarnings({ "rawtypes", "unchecked" })
protected void doHandleReceivedStreaming(byte[] bytes) {
try {
EzyStreamingRequest request = newStreamingRequest(bytes);
try {
EzyInterceptor interceptor = controllers.getStreamingInterceptor();
interceptor.intercept(context, request);
EzyStreamingController controller = controllers.getStreamingController();
controller.handle(zoneContext, request);
} finally {
request.release();
}
} catch (Throwable e) {
context.handleException(Thread.currentThread(), e);
}
}
use of com.tvd12.ezyfoxserver.request.EzyStreamingRequest in project ezyfox-server by youngmonkeys.
the class EzyUserDataHandler method newStreamingRequest.
protected EzyStreamingRequest newStreamingRequest(byte[] bytes) {
EzySimpleStreamingRequest request = new EzySimpleStreamingRequest();
request.setUser(user);
request.setSession(session);
request.setBytes(bytes);
return request;
}
use of com.tvd12.ezyfoxserver.request.EzyStreamingRequest in project ezyfox-server by youngmonkeys.
the class EzySimpleStreamingController method handle.
@Override
public void handle(EzyZoneContext ctx, EzyStreamingRequest request) {
EzyStreamingEvent event = new EzySimpleStreamingEvent(request.getUser(), request.getSession(), request.getBytes());
ctx.handleEvent(EzyEventType.STREAMING, event);
}
Aggregations