Examples of ProcessorModel


Examples of javax.media.ProcessorModel

//     // TODO: this is hard-coded, there must be a better way.
//   }
  
   private InputStream getInputStream(String urlStr, Format outputFormat, ContentDescriptor outputContentDescriptor) throws Exception
   {
     final ProcessorModel processorModel = new ProcessorModel(new MediaLocator(urlStr), outputFormat == null ? null : new Format[]{outputFormat}, outputContentDescriptor);
    
    final Processor processor = Manager.createRealizedProcessor(processorModel);
 
    final DataSource ds = processor.getDataOutput();
View Full Code Here

Examples of javax.media.ProcessorModel

{

  public void testProcessorModel()
  {
    {
      final ProcessorModel p = new ProcessorModel();
      for (int i = 0; i < 4; ++i)
        assertEquals(p.getTrackCount(i), -1);
     
      assertEquals(p.getOutputTrackFormat(0), null);
      assertEquals(p.getInputLocator(), null);
      assertTrue(p.isFormatAcceptable(0, new Format("xyz")));

    }
   
    {
     
      final ProcessorModel p = new ProcessorModel(
          new Format[] {
            new Format("abc"),
            new Format("xyz")
          },
          new ContentDescriptor("abc"));
      for (int i = 0; i < 4; ++i)
        assertEquals(p.getTrackCount(i), 2);
     
      assertTrue(p.getOutputTrackFormat(0).equals(new Format("abc")));
      assertTrue(p.getOutputTrackFormat(1).equals(new Format("xyz")));
      assertEquals(p.getOutputTrackFormat(2), null);
      assertTrue(p.isFormatAcceptable(0, new Format("abc")));
      assertTrue(p.isFormatAcceptable(0, new Format(null)));
      assertFalse(p.isFormatAcceptable(0, new Format("xyz")));
      assertTrue(p.isFormatAcceptable(2, new Format(null)));
      try
      {
        p.isFormatAcceptable(0, null);
        assertTrue(false);
      }
      catch (NullPointerException e)
      {
      }

      final StringBuffer b = new StringBuffer();
      assertTrue(p.isFormatAcceptable(0, new Format("abc"){

        //@Override
        public boolean matches(Format arg0)
        {
          b.append("matches called");
View Full Code Here

Examples of org.switchyard.component.jca.config.model.ProcessorModel

        OutboundInteractionModel outboundInteractionModel = jcaconfig.getOutboundInteraction();
        if (outboundInteractionModel == null) {
            throw JCAMessages.MESSAGES.noOutboundInteractionConfigured();
        }
        ProcessorModel processorModel = outboundInteractionModel.getProcessor();
        if (processorModel == null) {
            throw JCAMessages.MESSAGES.noProcessorConfigured();
        }
        Properties processorProps = processorModel.getProperties();
        AbstractOutboundProcessor processor = null;
        String processorClassName = processorModel.getProcessorClassName();
        Class<?> processorClass = null;
        try {
            processorClass = (Class<?>)_appClassLoader.loadClass(processorClassName);
            processor = (AbstractOutboundProcessor) processorClass.newInstance();
            if (!processorProps.isEmpty()) {
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.