Examples of Processor


Examples of org.jclouds.compute.domain.Processor

   @Override
   public Hardware apply(VMSpec from) {
      HardwareBuilder builder = new HardwareBuilder();
      builder.ids(from.toString());
      for (int i = 0; i < from.getProcessorCount(); i++)
         builder.processor(new Processor(1, 3.0));
      builder.ram(from.getMemoryInGig() * 1024);
      builder.volume(new VolumeBuilder().type(Volume.Type.LOCAL).device(from.getBootDeviceName()).size(
               new Float(from.getBootDiskSize())).bootDevice(true).durable(true).build());
      for (Entry<String, Integer> disk : from.getDataDiskDeviceNameToSizeInGig().entrySet())
         builder.volume(new VolumeBuilder().type(Volume.Type.LOCAL).device(disk.getKey()).size(
View Full Code Here

Examples of org.jclouds.compute.domain.Processor

   @Override
   public Processor apply(CPU cpu) {
      checkNotNull(cpu, "cpu");

      return new Processor(Double.valueOf(cpu.getCores()), Double.valueOf(cpu
            .getSpeedPerCore()));
   }
View Full Code Here

Examples of org.jibx.ws.process.Processor

        if (getBodyWriter() == null && request != null) {
            throw new WsConfigurationException(
                "Binding factory or handler must be defined for the outbound message body");
        }

        Processor processor = getProcessor();

        m_outCtx.setBody(request);

        String opname = null;
        MessageProperties msgProps = PoxProtocol.INSTANCE.buildMessageProperties(opname, getMessageOptions());
        DuplexConnection duplex = getChannel().getDuplex(msgProps, getMessageOptions().getXmlOptions());
        processor.invoke(duplex.getOutbound(), duplex.getInbound());

        return m_inCtx.getBody();
    }
View Full Code Here

Examples of org.jibx.ws.process.Processor

        if (getBodyWriter() == null && request != null) {
            throw new WsConfigurationException(
                "Binding factory or handler must be defined for the outbound SOAP body");
        }

        Processor processor = getProcessor();
        m_outCtx.setBody(request);

        MessageProperties msgProps = m_protocol.buildMessageProperties(m_operationName, getMessageOptions());
        DuplexConnection duplex = getChannel().getDuplex(msgProps, getMessageOptions().getXmlOptions());
        processor.invoke(duplex.getOutbound(), duplex.getInbound());

        Object body = m_inCtx.getBody();
        if (body instanceof SoapFault) {
            return handleFault((SoapFault) body);
        }
View Full Code Here

Examples of org.jibx.ws.process.Processor

    /**
     * Tests that a SOAP fault without SOAP details is received correctly.
     * @throws Exception
     */
    public void testReceiveFaultMessageWithoutErrorDetail() throws Exception {
        Processor processor = SoapProtocol.SOAP1_1.createProcessor(ExchangeContext.createInOnlyExchange(m_inCtx));
        StubbedChannel.setInput(TestObjects.SIMPLE_SOAP_FAULT);
        processor.receiveMessage(StubbedChannel.getInConnection());
        SoapFault expected = new SoapFault(SoapFault.FAULT_CODE_SERVER, TestObjects.FAULT_RESPONSE_FAULTSTRING, null);
        assertEquals(expected, m_inCtx.getBody());
    }
View Full Code Here

Examples of org.jibx.ws.process.Processor

    /**
     * Tests that a SOAP fault without SOAP details is received correctly.
     * @throws Exception
     */
    public void testReceiveFaultMessageWithErrorDetailWithoutHandlers() throws Exception {
        Processor processor = SoapProtocol.SOAP1_1.createProcessor(ExchangeContext.createInOnlyExchange(m_inCtx));
        StubbedChannel.setInput(TestObjects.DETAILED_SOAP_FAULT);
        processor.receiveMessage(StubbedChannel.getInConnection());
        SoapFault expected = new SoapFault(SoapFault.FAULT_CODE_CLIENT, "Invalid message format", "http://example.org/someactor");
        assertEquals(expected, m_inCtx.getBody());
    }
View Full Code Here

Examples of org.jibx.ws.process.Processor

     * Tests that a SOAP fault without SOAP details is received correctly.
     * @throws Exception
     */
    public void testReceiveFaultMessageWithErrorDetailWithHandler() throws Exception {
        m_inCtx.addHandler(SoapPhase.BODY_FAULT, new UnmarshallingInHandler(ErrorMessage.class));
        Processor processor = SoapProtocol.SOAP1_1.createProcessor(ExchangeContext.createInOnlyExchange(m_inCtx));
        StubbedChannel.setInput(TestObjects.DETAILED_SOAP_FAULT);
        processor.receiveMessage(StubbedChannel.getInConnection());
        SoapFault expected = new SoapFault(SoapFault.FAULT_CODE_CLIENT, "Invalid message format", "http://example.org/someactor");
        expected.addDetail(new ErrorMessage("There were lots of elements in the message that I did not understand"));
        expected.addDetail(new ErrorType("Severe"));
       
        assertEquals(expected, m_inCtx.getBody());
View Full Code Here

Examples of org.joseki.Processor

   * Initialise Joseki configuration to allow SPARQL querying of the
   * Jena back-end.
   */
  private void initSparqlQueryEngine() {
    ServiceRegistry myReg = new ServiceRegistry();
    Processor proc = new SPARQL();
    String baseRootURI = "#dataset";
    String serviceURI = "joseki/sparql";

    String dbPath = JenaDatabaseSupport.getDatabasePath();

View Full Code Here

Examples of org.mapfish.print.processor.Processor

        assertTrue(attribute instanceof AttributeWithSpringInjection);
        ((AttributeWithSpringInjection)attribute).assertInjected();

        assertEquals(1, template.getProcessorGraph().getAllProcessors().size());
        assertEquals(1, template.getProcessorGraph().getRoots().size());
        Processor processor = template.getProcessorGraph().getRoots().get(0).getProcessor();
        assertTrue(processor.toString(), processor instanceof ProcessorWithSpringInjection);
        ((ProcessorWithSpringInjection)processor).assertInjected();
    }
View Full Code Here

Examples of org.mokai.Processor

   *
   * @throws Exception
   */
  @Test
  public void shouldReturnUriIfAtLeastOneAcceptorAccepts() throws Exception {
    Processor p1 = mock(Processor.class);
    when(p1.supports(any(Message.class))).thenReturn(true);

    Acceptor a1 = buildAcceptor(true);
    Acceptor a2 = buildAcceptor(false);

    ConnectorService connectorService = buildConnectorService("test1", p1, a1, a2);
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.