Examples of StreamableValue


Examples of org.apache.slide.projector.value.StreamableValue

   
    private Application parseApplication(URI applicationUri) {
      try {
        SimpleImporter importer = new SimpleImporter();
        URI applicationDefinition = new URIValue(applicationUri.toString()+APPLICATION_CONFIG);
        StreamableValue applicationDefinitionResouce = ((StreamableValue)Projector.getRepository().getResource(applicationDefinition, context.getCredentials()));
        if ( applicationDefinitionResouce != null ) {
          InputStream configuration = applicationDefinitionResouce.getInputStream();
          ConfigurationHandler handler = new ConfigurationHandler(applicationUri);
          importer.addSimpleImportHandler(handler);
          importer.parse(new InputSource(configuration));
          return handler.getApplication();
        } else {
View Full Code Here

Examples of org.apache.slide.projector.value.StreamableValue

   
    public void install(URI messagesUri) {
      logger.log(Level.FINE, "Installing messages '"+messagesUri+"'");
      try {
        Map applicationMessages = new HashMap();
        StreamableValue messagesResource = (StreamableValue)Projector.getRepository().getResource(messagesUri, Projector.getCredentials());
        if ( messagesResource != null ) {
          InputStream inputStream = messagesResource.getInputStream();
          SimpleImporter importer = new SimpleImporter();
          importer.setIncludeLeadingCDataIntoStartElementCallback(true);
          ConfigurationHandler handler = new ConfigurationHandler();
          importer.addSimpleImportHandler(handler);
          importer.parse(new InputSource(inputStream));
View Full Code Here

Examples of org.apache.slide.projector.value.StreamableValue

                    }
                    URI configurationUri = new URIValue(configURI);
                    if ( processorDescriptor.getConfiguration() == null || !processorDescriptor.getConfiguration().equals(configurationUri) ) {
                      logger.log(Level.FINE, "Configuring processor with config-URI=" + configURI);
                      processorDescriptor.setConfiguration(configurationUri);
                      StreamableValue config = (StreamableValue)Projector.getRepository().getResource(configurationUri, Projector.getCredentials());
                      ((ConfigurableProcessor)processor).configure(config);
                      // listen for configuration changes
                      Subscriber subscriber = new ConfigurationListener();
                      Projector.getRepository().subscribe("Update", configurationUri, 0, subscriber, Projector.getCredentials());
                      configurationListeners.put(configurationUri, subscriber);
View Full Code Here

Examples of org.apache.slide.projector.value.StreamableValue

      public void notify(String uri, Map information) {
        URI processorUri = new URIValue(uri);
        Processor processor = (Processor)configuredProcessors.get(processorUri);
        logger.log(Level.FINE, "Reloading processor with configuration URI='"+uri+"'");
        try {
          StreamableValue config = (StreamableValue)Projector.getRepository().getResource(processorUri, Projector.getCredentials());
          ((ConfigurableProcessor)processor).configure(config);
        } catch ( IOException e ) {
          logger.log(Level.SEVERE, "Configuration resource with URI='"+uri+"' could not be loaded!", e);
        } catch ( ConfigurationException e ) {
          logger.log(Level.SEVERE, "Processor with configuration URI='" + uri + "' could not be reloaded! Configuration resource might be invalid!", e);
View Full Code Here

Examples of org.apache.slide.projector.value.StreamableValue

    public Class findClass(String name) throws ClassNotFoundException {
        Context context = new SystemContext();
        try {
            URI rendererUri = new URIValue(uri.toString() + name.replace('.', '/') + ".class");
            StreamableValue resource = ((StreamableValue)Projector.getRepository().getResource(rendererUri, context.getCredentials()));
            if ( resource == null ) {
              throw new ClassNotFoundException("Class " + name + " at URI '"+rendererUri+"' not found in collection '" + uri + "'!");
            }
            InputStream inputStream = resource.getInputStream();
            ByteArrayOutputStream outputStream = new ByteArrayOutputStream(1024);
            StreamHelper.copy(inputStream, outputStream);
            byte[] b = outputStream.toByteArray();
            return defineClass(name, b, 0, b.length);
        } catch (IOException e) {
View Full Code Here

Examples of org.apache.slide.projector.value.StreamableValue

   
    public void install(URI jobsUri, boolean restoreRunningJobs) {
      logger.log(Level.FINE, "Installing scheduled jobs of application '"+jobsUri+"'");
      try {
        List applicationJobs = new ArrayList();
        StreamableValue jobsResource = (StreamableValue)Projector.getRepository().getResource(jobsUri, Projector.getCredentials());
        // FIXME: Beautify the code...
        if ( jobsResource != null ) {
          DocumentValue documentResource = new DocumentValue(jobsResource);
          Document document = documentResource.getDocument();
          Element rootElement = document.getRootElement();
View Full Code Here

Examples of org.omg.CORBA.portable.StreamableValue

        {
            java.lang.Object implObj = instantiate (implementationClass);

            if (implObj instanceof org.omg.CORBA.portable.Streamable)
            {
                StreamableValue value =
                (StreamableValue)instantiate (implementationClass);

                return is.read_value(value);
            }
            else if (implObj instanceof org.omg.CORBA.portable.CustomValue )
View Full Code Here

Examples of org.omg.CORBA.portable.StreamableValue

        {
            java.lang.Object implObj = instantiate (implementationClass);

            if (implObj instanceof org.omg.CORBA.portable.Streamable)
            {
                StreamableValue value =
                (StreamableValue)instantiate (implementationClass);

                return is.read_value(value);
            }
            else if (implObj instanceof org.omg.CORBA.portable.CustomValue )
View Full Code Here

Examples of org.omg.CORBA.portable.StreamableValue

        {
            java.lang.Object implObj = instantiate (implementationClass);

            if (implObj instanceof org.omg.CORBA.portable.Streamable)
            {
                StreamableValue value =
                (StreamableValue)instantiate (implementationClass);

                return is.read_value(value);
            }
            else if (implObj instanceof org.omg.CORBA.portable.CustomValue )
View Full Code Here

Examples of org.omg.CORBA.portable.StreamableValue

        {
            java.lang.Object implObj = instantiate (implementationClass);

            if (implObj instanceof org.omg.CORBA.portable.Streamable)
            {
                StreamableValue value =
                (StreamableValue)instantiate (implementationClass);

                return is.read_value(value);
            }
            else if (implObj instanceof org.omg.CORBA.portable.CustomValue )
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.