Examples of Pipeline


Examples of com.sun.grizzly.Pipeline

                return protocolChains.offer(pc);
            }
        };
       
        controller.setProtocolChainInstanceHandler(instanceHandler);
        Pipeline pipeline = new DefaultPipeline();

        if(getServer().getThreadPool() instanceof BoundedThreadPool)
            pipeline.setMaxThreads(((BoundedThreadPool)getServer().getThreadPool()).getMaxThreads());
        else if (getServer().getThreadPool() instanceof QueuedThreadPool)
            pipeline.setMaxThreads(((QueuedThreadPool)getServer().getThreadPool()).getMaxThreads());
        controller.setPipeline(pipeline);
    }
View Full Code Here

Examples of com.tinkerpop.pipes.util.Pipeline

        graph.addEdge("12", nonUtf8, utf8Name, "created").setProperty("weight", 0.2f);

        ScriptEngine engine = new GremlinGroovyScriptEngine();

        engine.put("g", graph);
        Pipeline eval = (Pipeline) engine.eval("g.idx(\"nodes\")[['name' : 'marko']]");
        assertEquals(nonUtf8, eval.next());
        eval = (Pipeline) engine.eval("g.idx(\"nodes\")[['name' : '轉注']]");
        assertEquals(utf8Name, eval.next());
    }
View Full Code Here

Examples of de.matrixweb.smaller.pipeline.Pipeline

  /**
   * @see de.matrixweb.smaller.client.osgi.internal.ProcessorFactoryServiceTracker.ProcessorFactoryServiceListener#addedProcessorFactory(de.matrixweb.smaller.resource.ProcessorFactory)
   */
  public void addedProcessorFactory(final ProcessorFactory processorFactory) {
    this.pipeline = new Pipeline(processorFactory);
    updateSerlvetStatus();
  }
View Full Code Here

Examples of de.matrixweb.smaller.pipeline.Pipeline

    final ProcessorFactory processorFactory = new JavaEEProcessorFactory();
    try {
      final VFS vfs = new VFS();
      try {
        vfs.mount(vfs.find("/"), new ServletFile(getServletContext(), "/"));
        this.result = new Pipeline(processorFactory).execute(
            Version.getCurrentVersion(), vfs, new VFSResourceResolver(vfs),
            task);
      } finally {
        vfs.dispose();
      }
View Full Code Here

Examples of de.matrixweb.smaller.pipeline.Pipeline

   * @throws Exception
   */
  @Test
  public void testService() throws Exception {
    final Result result = mock(Result.class);
    final Pipeline pipeline = mock(Pipeline.class);
    when(
        pipeline.execute(Matchers.isA(Version.class), Matchers.isA(VFS.class),
            Matchers.isA(VFSResourceResolver.class), Matchers.isA(Task.class)))
        .thenReturn(result);

    final HttpServletRequest request = mock(HttpServletRequest.class);
    final ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

Examples of gov.nist.javax.sip.parser.Pipeline

     * messages until we are done or the other end has closed.
     */
   
  
   public void run() {
        Pipeline hispipe = null;
        // Create a pipeline to connect to our message parser.
        hispipe = new Pipeline(myClientInputStream, sipStack.readTimeout,
                ((SIPTransactionStack) sipStack).getTimer());
        // Create a pipelined message parser to read and parse
        // messages that we write out to him.
        myParser = new PipelinedMsgParser(sipStack, this, hispipe,
                this.sipStack.getMaxMessageSize());
        // Start running the parser thread.
        myParser.processInput();
        // bug fix by Emmanuel Proulx
        int bufferSize = 4096;
        this.tcpMessageProcessor.useCount++;
        this.isRunning = true;
        try {
            while (true) {
                try {
                    byte[] msg = new byte[bufferSize];
                    int nbytes = myClientInputStream.read(msg, 0, bufferSize);
                    // no more bytes to read...
                    if (nbytes == -1) {
                        hispipe.write("\r\n\r\n".getBytes("UTF-8"));
                        try {
                            if (sipStack.maxConnections != -1) {
                                synchronized (tcpMessageProcessor) {
                                    tcpMessageProcessor.nConnections--;
                                    tcpMessageProcessor.notify();
                                }
                            }
                            hispipe.close();
                            if (mySock != null) { // self routing makes sock =
                                                  // ull
                                                  // https://jain-sip.dev.java.net/issues/show_bug.cgi?id=297
                              if (sipStack.isLoggingEnabled(LogWriter.TRACE_DEBUG))
                                    sipStack.getStackLogger().logDebug(
                                            "Closing socket");
                                mySock.close();
                            }
                        } catch (IOException ioex) {
                        }
                        return;
                    }
                    hispipe.write(msg, 0, nbytes);

                } catch (IOException ex) {
                    // Terminate the message.
                    try {
                        hispipe.write("\r\n\r\n".getBytes("UTF-8"));
                    } catch (Exception e) {
                        // InternalErrorHandler.handleException(e);
                    }

                    try {
                        if (sipStack.isLoggingEnabled(LogWriter.TRACE_DEBUG))
                            sipStack.getStackLogger().logDebug(
                                    "IOException  closing sock " + ex);
                        try {
                            if (sipStack.maxConnections != -1) {
                                synchronized (tcpMessageProcessor) {
                                    tcpMessageProcessor.nConnections--;
                                    // System.out.println("Notifying!");
                                    tcpMessageProcessor.notify();
                                }
                            }
                            if (mySock != null) { // self routing makes sock =
                                                  // null
                                                  // https://jain-sip.dev.java.net/issues/show_bug.cgi?id=297
                                if (sipStack.isLoggingEnabled(LogWriter.TRACE_DEBUG))
                                    sipStack.getStackLogger().logDebug(
                                            "Closing socket");
                                mySock.close();
                            }
                            hispipe.close();
                        } catch (IOException ioex) {
                        }
                    } catch (Exception ex1) {
                        // Do nothing.
                    }
View Full Code Here

Examples of net.sf.pipet.api.Pipeline

    return pipeline;
  }
 
  public Map<String,String> getPipeTypes(ModuleAttributes atts, boolean use_input) throws ResourceException
  {
    Pipeline p = getPipeline(atts);
    if (p == null)
      return Collections.emptyMap();
   
    String default_ctype = use_input ? MimeType.ANY : MimeType.UNKNOWN;
   
    Map<String,Collection<Plug>> pipes = use_input ? p.getInputPipes() : p.getOutputPipes();
   
    Map<String,String> types = new HashMap<String,String>();
    for (Map.Entry<String, Collection<Plug>> e : pipes.entrySet())
    {
      if (e.getValue().isEmpty())
View Full Code Here

Examples of net.sf.toxicity.Pipeline

    private void process() { }
   
    @Around("process()")
    private Document process(ProceedingJoinPoint pjp) throws Throwable {
       
        Pipeline p = (Pipeline)pjp.getTarget();
        Document d = (Document)pjp.getArgs()[0];
       
        MimeType mt = p.getClass().getAnnotation(MimeType.class);
        if(mt != null) {
            String mimeType = mt.value();
            log.debug("Specified document mime type: " + mimeType);
            mLastMimeType.set(mt.value());
        } else {
View Full Code Here

Examples of org.apache.camel.processor.Pipeline

    /**
     * Creates a new instance of some kind of composite processor which defaults
     * to using a {@link Pipeline} but derived classes could change the behaviour
     */
    protected Processor createCompositeProcessor(RouteContext routeContext, List<Processor> list) throws Exception {
        return new Pipeline(routeContext.getCamelContext(), list);
    }
View Full Code Here

Examples of org.apache.catalina.Pipeline

      request.recycle();
   }
  
   public static Valve setupPipeline(Manager manager, RequestHandler requestHandler)
   {
      Pipeline pipeline = manager.getContainer().getPipeline();
     
      // Clean out any existing request handler
      Valve[] valves = pipeline.getValves();
      RequestHandlerValve mockValve = null;
      for (Valve valve: valves)
      {
         if (valve instanceof RequestHandlerValve)        
         {
            mockValve = (RequestHandlerValve) valve;
            break;
         }
      }
     
      if (mockValve == null)
      {
         mockValve = new RequestHandlerValve(requestHandler);
         pipeline.addValve(mockValve);
      }
      else
      {
         mockValve.setRequestHandler(requestHandler);
      }
     
      return pipeline.getFirst();
   }
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.