Examples of TimeoutHandler


Examples of javax.ws.rs.container.TimeoutHandler

        return withTimeout(timeout, Suppliers.ofInstance(timeoutResponse));
    }

    public AsyncResponseHandler withTimeout(Duration timeout, final Supplier<Response> timeoutResponse)
    {
        asyncResponse.setTimeoutHandler(new TimeoutHandler()
        {
            @Override
            public void handleTimeout(AsyncResponse asyncResponse)
            {
                asyncResponse.resume(timeoutResponse.get());
View Full Code Here

Examples of javax.ws.rs.container.TimeoutHandler

            responder.completionCallbackRunner.register(this);
        }

        @Override
        public void onTimeout(final ContainerResponseWriter responseWriter) {
            final TimeoutHandler handler = timeoutHandler;
            try {
                synchronized (stateLock) {
                    if (state == SUSPENDED) {
                        handler.handleTimeout(this);
                    }
                }
            } catch (final Throwable throwable) {
                resume(throwable);
            }
View Full Code Here

Examples of javax.ws.rs.container.TimeoutHandler

            responder.completionCallbackRunner.register(this);
        }

        @Override
        public void onTimeout(ContainerResponseWriter responseWriter) {
            final TimeoutHandler handler = timeoutHandler;
            try {
                synchronized (stateLock) {
                    if (state == SUSPENDED) {
                        handler.handleTimeout(this);
                    }
                }
            } catch (Throwable throwable) {
                try {
                    resume(throwable);
View Full Code Here

Examples of javax.ws.rs.container.TimeoutHandler

    @Resource(name = "DefaultManagedThreadFactory")
    ManagedThreadFactory threadFactory;
   
    @GET
    public void getList(@Suspended final AsyncResponse ar) {
        ar.setTimeoutHandler(new TimeoutHandler() {

            @Override
            public void handleTimeout(AsyncResponse ar) {
                ar.resume("Operation timed out");
            }
View Full Code Here

Examples of org.apache.james.protocols.impl.TimeoutHandler

            private final static int TIMEOUT = 30 * 60;
           
            public ChannelPipeline getPipeline() throws Exception {
                ChannelPipeline pipeline = pipeline();
                pipeline.addLast("groupHandler", groupHandler);
                pipeline.addLast("timeoutHandler", new TimeoutHandler(timer, TIMEOUT));
                pipeline.addLast("connectionLimit", new ConnectionLimitUpstreamHandler(IMAPServer.this.connectionLimit));

                pipeline.addLast("connectionPerIpLimit", new ConnectionPerIpLimitUpstreamHandler(IMAPServer.this.connPerIP));

                if (isSSLSocket()) {
View Full Code Here

Examples of org.glassfish.grizzly.http.server.TimeoutHandler

                                    AsyncContextImpl.AsyncEventType.COMPLETE,
                                    null);
                        }
                    };

            final TimeoutHandler timeoutHandler = new TimeoutHandler() {

                @Override
                public boolean onTimeout(final org.glassfish.grizzly.http.server.Response response) {
                    return processTimeout();
                }
View Full Code Here

Examples of org.glassfish.grizzly.http.server.TimeoutHandler

                                    AsyncContextImpl.AsyncEventType.COMPLETE,
                                    null);
                        }
                    };

            final TimeoutHandler timeoutHandler = new TimeoutHandler() {

                @Override
                public boolean onTimeout(final org.glassfish.grizzly.http.server.Response response) {
                    return processTimeout();
                }
View Full Code Here

Examples of org.glassfish.grizzly.http.server.TimeoutHandler

                                    AsyncContextImpl.AsyncEventType.COMPLETE,
                                    null);
                        }
                    };

            final TimeoutHandler timeoutHandler = new TimeoutHandler() {

                @Override
                public boolean onTimeout(final org.glassfish.grizzly.http.server.Response response) {
                    return processTimeout();
                }
View Full Code Here

Examples of org.glassfish.grizzly.http.server.TimeoutHandler

                                    AsyncContextImpl.AsyncEventType.COMPLETE,
                                    null);
                        }
                    };

            final TimeoutHandler timeoutHandler = new TimeoutHandler() {

                @Override
                public boolean onTimeout(final org.glassfish.grizzly.http.server.Response response) {
                    return processTimeout();
                }
View Full Code Here

Examples of org.glassfish.grizzly.http.server.TimeoutHandler

                                    AsyncContextImpl.AsyncEventType.COMPLETE,
                                    null);
                        }
                    };

            final TimeoutHandler timeoutHandler = new TimeoutHandler() {

                @Override
                public boolean onTimeout(final org.glassfish.grizzly.http.server.Response response) {
                    return processTimeout();
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.