Examples of recycle()


Examples of org.apache.tomcat.util.http.MimeHeaders.recycle()

       while (cookies.hasNext()) {
           request.addCookie((Cookie) cookies.next());
       }

       MimeHeaders rmh = request.getCoyoteRequest().getMimeHeaders();
       rmh.recycle();
       boolean cachable = "GET".equalsIgnoreCase(saved.getMethod()) ||
                          "HEAD".equalsIgnoreCase(saved.getMethod());
       Iterator names = saved.getHeaderNames();
       while (names.hasNext()) {
           String name = (String) names.next();
View Full Code Here

Examples of org.apache.velocity.io.VelocityWriter.recycle()

            {
                vw = new VelocityWriter(pw, 4 * 1024, true);
            }
            else
            {
                vw.recycle(pw);
            }
     
      // Place the VelocityWriter into the Context
      context.put(VELOCITY_WRITER_ATTR, vw);
            template.merge(context, vw);
View Full Code Here

Examples of org.glassfish.grizzly.GrizzlyFuture.recycle()

            if (connection != null
                    && serverConnections.remove(connection)) {
                final GrizzlyFuture future = connection.close();
                try {
                    future.get(1000, TimeUnit.MILLISECONDS);
                    future.recycle(false);
                } catch (Exception e) {
                    LOGGER.log(Level.WARNING,
                            LogMessages.WARNING_GRIZZLY_TRANSPORT_UNBINDING_CONNECTION_EXCEPTION(connection),
                            e);
                }
View Full Code Here

Examples of org.glassfish.grizzly.ReadResult.recycle()

     * @throws IOException
     */
    protected HttpContent blockingRead() throws IOException {
        final ReadResult rr = ctx.read();
        final HttpContent c = (HttpContent) rr.getMessage();
        rr.recycle();
        return c;
    }

    /**
     * <p>
 
View Full Code Here

Examples of org.glassfish.grizzly.asyncqueue.AsyncReadQueueRecord.recycle()

                    if (!isQueueEmpty) {
                        onReadyToRead(connection);
                    }

                    intercept(COMPLETE_EVENT, queueRecord, null);
                    queueRecord.recycle();
                } else { // If direct read is not finished
                // Create future
                    if ((interceptInstructions & Interceptor.RESET) != 0) {
                        currentResult.setMessage(null);
                        currentResult.setReadSize(0);
View Full Code Here

Examples of org.glassfish.grizzly.http.HttpCodecFilter.HeaderParsingState.recycle()

        final HeaderParsingState parsingState = httpPacket.getHeaderParsingState();

        if (parsingState.state == CHUNK_LENGTH_PARSED_STATE) {
            while (input.hasRemaining()) {
                if (input.get() == Constants.LF) {
                    parsingState.recycle();
                    if (input.hasRemaining()) {
                        return input.slice();
                    }

                    return null;
View Full Code Here

Examples of org.glassfish.grizzly.http.HttpContent.recycle()

            if (message.getContent().hasRemaining()) {

                // get the frame(s) content
                Buffer buffer = message.getContent();
                final ByteBuffer webSocketBuffer = buffer.toByteBuffer();
                message.recycle();
                final ReadHandler readHandler = tyrusConnection.getReadHandler();

                TaskProcessor taskProcessor = TASK_PROCESSOR.get(ctx.getConnection());
                taskProcessor.processTask(new ProcessTask(webSocketBuffer, readHandler));
            }
View Full Code Here

Examples of org.glassfish.grizzly.http.HttpRequestPacket.recycle()

    private static void recycleRequestResponsePackets(final Connection c, final HttpResponsePacket response) {
        if (!Utils.isSpdyConnection(c)) {
            HttpRequestPacket request = response.getRequest();
            request.setExpectContent(false);
            response.recycle();
            request.recycle();
        }
    }

    private boolean sendAsGrizzlyRequest(
            final RequestInfoHolder requestInfoHolder,
View Full Code Here

Examples of org.glassfish.grizzly.http.server.util.MappingData.recycle()

        Wrapper wrapper = (Wrapper) mappingData.wrapper;
        String wrapperPath = mappingData.wrapperPath.toString();
        String pathInfo = mappingData.pathInfo.toString();

        mappingData.recycle();

        // Construct a RequestDispatcher to process this request
        return new ApplicationDispatcher
            (wrapper, uriCC.toString(), wrapperPath, pathInfo,
             queryString, null);
View Full Code Here

Examples of org.glassfish.grizzly.http.server.util.SimpleDateFormats.recycle()

            if (result != (-1L)) {
                return result;
            }
            throw new IllegalArgumentException(dateHeader);
        } finally {
            formats.recycle();
        }

    }

    private static class EntryWorker implements DelayedExecutor.Worker<FileCacheEntry> {
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.