Class ForecastSolarService

java.lang.Object
org.apache.camel.builder.BuilderSupport
org.apache.camel.builder.RouteBuilder
org.openremote.manager.energy.ForecastSolarService
All Implemented Interfaces:
org.apache.camel.builder.ModelRoutesBuilder, org.apache.camel.CamelContextAware, org.apache.camel.Ordered, org.apache.camel.RoutesBuilder, org.apache.camel.spi.HasCamelContext, org.apache.camel.spi.ResourceAware, org.openremote.model.ContainerService

public class ForecastSolarService extends org.apache.camel.builder.RouteBuilder implements org.openremote.model.ContainerService
Fills in power forecast from ForecastSolar (https://forecast.solar) for ElectricityProducerSolarAsset.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static class 
     
    protected static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
     
     
     
    protected org.jboss.resteasy.client.jaxrs.ResteasyWebTarget
     
    protected GatewayService
     
    protected static final DateTimeFormatter
     
    protected static final Logger
     
    static final String
     
    protected static final AtomicReference<org.jboss.resteasy.client.jaxrs.ResteasyClient>
     
    protected RulesService
     
     
    protected org.openremote.container.timer.TimerService
     

    Fields inherited from class org.apache.camel.builder.RouteBuilder

    log

    Fields inherited from interface org.openremote.model.ContainerService

    DEFAULT_PRIORITY, HIGH_PRIORITY, LOW_PRIORITY, MED_PRIORITY

    Fields inherited from interface org.apache.camel.Ordered

    HIGHEST, LOWEST
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected void
    getSolarForecast(org.openremote.model.asset.impl.ElectricityProducerSolarAsset electricityProducerSolarAsset)
     
    void
    init(org.openremote.model.Container container)
     
    protected static void
     
    protected void
    processAssetChange(org.openremote.model.PersistenceEvent<org.openremote.model.asset.impl.ElectricityProducerSolarAsset> persistenceEvent)
     
    protected void
    processElectricityProducerSolarAssetAttributeEvent(org.openremote.model.attribute.AttributeEvent attributeEvent)
     
    protected void
     
    void
    start(org.openremote.model.Container container)
     
    void
    stop(org.openremote.model.Container container)
     
    protected void
    updateSolarForecastAttribute(org.openremote.model.asset.impl.ElectricityProducerSolarAsset electricityProducerSolarAsset)
     

    Methods inherited from class org.apache.camel.builder.RouteBuilder

    addLifecycleInterceptor, addRoutes, addRoutesToCamelContext, addTemplatedRoutesToCamelContext, bindToRegistry, bindToRegistry, checkInitialized, configuration, configureRest, configureRests, configureRoute, configureRouteConfiguration, configureRoutes, configureRouteTemplate, configureTemplatedRoute, customize, customize, dataFormat, errorHandler, errorHandler, expression, from, from, from, fromF, fromV, fromV, getBeans, getOrder, getResource, getRestCollection, getRestConfiguration, getRests, getRouteCollection, getRoutes, getRouteTemplateCollection, getTemplatedRouteCollection, initializeCamelContext, intercept, interceptFrom, interceptFrom, interceptSendToEndpoint, loadRoutesBuilder, loadRoutesBuilder, onCompletion, onException, onException, populateBeans, populateOrUpdateRoutes, populateRests, populateRoutes, populateRouteTemplates, populateTemplatedRoutes, populateTransformers, populateValidators, prepareModel, property, propertyInject, removeLifecycleInterceptor, rest, rest, restConfiguration, routeTemplate, setErrorHandlerFactory, setResource, setRestCollection, setRouteTemplateCollection, setTemplatedRouteCollection, templatedRoute, tokenizer, toString, transformer, updateRoutesToCamelContext, validator

    Methods inherited from class org.apache.camel.builder.BuilderSupport

    body, bodyAs, constant, constant, constant, createErrorHandlerBuilder, csimple, csimple, datasonnet, datasonnet, datasonnet, deadLetterChannel, deadLetterChannel, defaultErrorHandler, endpoint, endpoint, exceptionMessage, exchangeProperty, expression, getCamelContext, getContext, getErrorHandlerFactory, hasErrorHandlerFactory, header, java, java, joor, joor, jq, jq, jsonpath, jsonpath, jtaTransactionErrorHandler, jtaTransactionErrorHandler, jtaTransactionErrorHandler, method, method, method, method, noErrorHandler, regexReplaceAll, regexReplaceAll, setCamelContext, simple, simple, simpleF, simpleF, springTransactionErrorHandler, springTransactionErrorHandler, springTransactionErrorHandler, systemProperty, systemProperty, variable, xpath, xpath, xpath, xpath

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.openremote.model.ContainerService

    getPriority
  • Field Details

    • OR_FORECAST_SOLAR_API_KEY

      public static final String OR_FORECAST_SOLAR_API_KEY
      See Also:
    • ISO_LOCAL_DATE_TIME_WITHOUT_T

      protected static final DateTimeFormatter ISO_LOCAL_DATE_TIME_WITHOUT_T
    • scheduledExecutorService

      protected ScheduledExecutorService scheduledExecutorService
    • assetStorageService

      protected AssetStorageService assetStorageService
    • assetProcessingService

      protected AssetProcessingService assetProcessingService
    • assetPredictedDatapointService

      protected AssetPredictedDatapointService assetPredictedDatapointService
    • gatewayService

      protected GatewayService gatewayService
    • clientEventService

      protected ClientEventService clientEventService
    • rulesService

      protected RulesService rulesService
    • timerService

      protected org.openremote.container.timer.TimerService timerService
    • LOG

      protected static final Logger LOG
    • resteasyClient

      protected static final AtomicReference<org.jboss.resteasy.client.jaxrs.ResteasyClient> resteasyClient
    • forecastSolarTarget

      protected org.jboss.resteasy.client.jaxrs.ResteasyWebTarget forecastSolarTarget
  • Constructor Details

    • ForecastSolarService

      public ForecastSolarService()
  • Method Details

    • configure

      public void configure() throws Exception
      Specified by:
      configure in class org.apache.camel.builder.RouteBuilder
      Throws:
      Exception
    • init

      public void init(org.openremote.model.Container container) throws Exception
      Specified by:
      init in interface org.openremote.model.ContainerService
      Throws:
      Exception
    • start

      public void start(org.openremote.model.Container container) throws Exception
      Specified by:
      start in interface org.openremote.model.ContainerService
      Throws:
      Exception
    • stop

      public void stop(org.openremote.model.Container container) throws Exception
      Specified by:
      stop in interface org.openremote.model.ContainerService
      Throws:
      Exception
    • initClient

      protected static void initClient()
    • processElectricityProducerSolarAssetAttributeEvent

      protected void processElectricityProducerSolarAssetAttributeEvent(org.openremote.model.attribute.AttributeEvent attributeEvent)
    • processAssetChange

      protected void processAssetChange(org.openremote.model.PersistenceEvent<org.openremote.model.asset.impl.ElectricityProducerSolarAsset> persistenceEvent)
    • processSolarData

      protected void processSolarData()
    • getSolarForecast

      protected void getSolarForecast(org.openremote.model.asset.impl.ElectricityProducerSolarAsset electricityProducerSolarAsset)
    • updateSolarForecastAttribute

      protected void updateSolarForecastAttribute(org.openremote.model.asset.impl.ElectricityProducerSolarAsset electricityProducerSolarAsset)