Examples of recycle()


Examples of net.sf.nebulacards.util.RecyclingPile.recycle()

    RecyclingPile rp = new RecyclingPile();
    rp.addAll(PileOfCards.getStandardDeck());
    int size = rp.size();
    for (int i = 0; i < size - 1; i++)
    {
      rp.recycle(rp.takeTop());
    }
    assertEquals(1, rp.size())// check that the remove worked
    // this remove operation should cause the pile to be regenerated.
    rp.takeTop();
    assertEquals(size - 1, rp.size());
View Full Code Here

Examples of org.apache.ajp.Ajp13.recycle()

      {
        ajpRequest.recycle();
        request.recycle();

        // recycle ajp13 object
        ajp13.recycle();

        continue;
      }

      if( status != 200 )
View Full Code Here

Examples of org.apache.catalina.connector.Request.recycle()

                try {
                    RequestFacade request = RequestFacade.class.cast(event.getHttpServletRequest());
                    Field coyoteRequest = RequestFacade.class.getDeclaredField("request");
                    coyoteRequest.setAccessible(true);
                    Request r = (Request) coyoteRequest.get(request);
                    r.recycle();

                    Field mappingData = Request.class.getDeclaredField("mappingData");
                    mappingData.setAccessible(true);
                    MappingData m = new MappingData();
                    m.context = null;
View Full Code Here

Examples of org.apache.catalina.connector.Response.recycle()

                try {
                    ResponseFacade response = ResponseFacade.class.cast(event.getHttpServletResponse());
                    Field coyoteResponse = ResponseFacade.class.getDeclaredField("response");
                    coyoteResponse.setAccessible(true);
                    Response r = (Response) coyoteResponse.get(response);
                    r.recycle();
                } catch (Throwable t) {
                    logger.trace("Was unable to recycle internal Tomcat object");
                }
            } else {
                try {
View Full Code Here

Examples of org.apache.cocoon.components.sax.XMLByteStreamInterpreter.recycle()

                    rowPipe.init(row);
                    rowPipe.setContentHandler(contentHandler);
                    rowPipe.setLexicalHandler(lexicalHandler);
                    interpreter.setConsumer(rowPipe);
                    interpreter.deserialize(saxFragment);
                    interpreter.recycle();
                    rowPipe.recycle();
                }
            } else {
                stylingHandler.recycle();
                stylingHandler.setSaxFragment(xmlCompiler.getSAXFragment());
View Full Code Here

Examples of org.apache.cocoon.components.source.URLSource.recycle()

                source.toSAX(handler);
                builtin = handler.getConfiguration();
            } finally {
                this.manager.release((Component)factory);
                if (source != null) {
                    source.recycle();
                }
            }
        } catch(Exception e) {
            String msg = "Error while reading treeprocessor.xconf : " + e.getMessage();
            getLogger().error(msg, e);
View Full Code Here

Examples of org.apache.cocoon.environment.Source.recycle()

            try {
                InputSource xslsrc = source.getInputSource();
                loaderprocessor.loadStylesheet(xslsrc);
                if (store != null) store.store(xsluri, loaderprocessor);
            } finally {
                source.recycle();
            }
        }

        // Always clone the processor before using it,
        // Indeed 1 instance per thread is allowed
View Full Code Here

Examples of org.apache.commons.httpclient.HttpMethod.recycle()

        System.out.println("*** Response Body ***");
        System.out.println(responseBody);

        //clean up the connection resources
        method.releaseConnection();
        method.recycle();

        System.exit(0);
    }
}
View Full Code Here

Examples of org.apache.commons.httpclient.methods.GetMethod.recycle()

        } catch (Throwable t) {
            t.printStackTrace();
            fail("Unable to execute method : " + t.toString());
        }

        method.recycle();
        method.setPath("/index.html");
        method.setUseDisk(true);

        try {
            client.executeMethod(method);
View Full Code Here

Examples of org.apache.commons.httpclient.methods.HeadMethod.recycle()

            fail("Unable to execute method : " + t.toString());
        }

        assertEquals(200, method.getStatusCode());

        method.recycle();
        method.setPath(path);

        try {
            client.executeMethod(method);
        } catch (Throwable t) {
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.