Package org.openremote.manager.energy
Class ForecastWindService
java.lang.Object
org.apache.camel.builder.BuilderSupport
org.apache.camel.builder.RouteBuilder
org.openremote.manager.energy.ForecastWindService
- 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 ForecastWindService
extends org.apache.camel.builder.RouteBuilder
implements org.openremote.model.ContainerService
Calculates power generation for
ElectricityProducerWindAsset.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AssetPredictedDatapointServiceprotected AssetProcessingServiceprotected AssetStorageServiceprotected ClientEventServiceprotected GatewayServiceprotected static final Loggerstatic final Stringprotected static final AtomicReference<org.jboss.resteasy.client.jaxrs.ResteasyClient> protected RulesServiceprotected ScheduledExecutorServiceFields inherited from class org.apache.camel.builder.RouteBuilder
logFields inherited from interface org.openremote.model.ContainerService
DEFAULT_PRIORITY, HIGH_PRIORITY, LOW_PRIORITY, MED_PRIORITYFields inherited from interface org.apache.camel.Ordered
HIGHEST, LOWEST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected doublecalculatePower(org.openremote.model.asset.impl.ElectricityProducerWindAsset electricityProducerWindAsset, ForecastWindService.WeatherForecastModel weatherForecastModel) voidvoidinit(org.openremote.model.Container container) protected static voidprotected voidprocessAssetChange(org.openremote.model.PersistenceEvent<org.openremote.model.asset.impl.ElectricityProducerWindAsset> persistenceEvent) protected voidprocessAttributeEvent(org.openremote.model.attribute.AttributeEvent attributeEvent) protected voidprocessElectricityProducerWindAssetAttributeEvent(org.openremote.model.attribute.AttributeEvent attributeEvent) protected voidprocessWeatherData(org.openremote.model.asset.impl.ElectricityProducerWindAsset electricityProducerWindAsset) voidstart(org.openremote.model.Container container) protected voidstartCalculation(org.openremote.model.asset.impl.ElectricityProducerWindAsset electricityProducerWindAsset) voidstop(org.openremote.model.Container container) protected voidstopCalculation(String electricityProducerWindAssetId) 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, validatorMethods 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, xpathMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.openremote.model.ContainerService
getPriority
-
Field Details
-
OR_OPEN_WEATHER_API_APP_ID
- See Also:
-
LOG
-
resteasyClient
protected static final AtomicReference<org.jboss.resteasy.client.jaxrs.ResteasyClient> resteasyClient -
assetStorageService
-
assetProcessingService
-
gatewayService
-
assetPredictedDatapointService
-
clientEventService
-
scheduledExecutorService
-
rulesService
-
-
Constructor Details
-
ForecastWindService
public ForecastWindService()
-
-
Method Details
-
configure
- Specified by:
configurein classorg.apache.camel.builder.RouteBuilder- Throws:
Exception
-
init
- Specified by:
initin interfaceorg.openremote.model.ContainerService- Throws:
Exception
-
start
- Specified by:
startin interfaceorg.openremote.model.ContainerService- Throws:
Exception
-
stop
- Specified by:
stopin interfaceorg.openremote.model.ContainerService- Throws:
Exception
-
initClient
protected static void initClient() -
processAttributeEvent
protected void processAttributeEvent(org.openremote.model.attribute.AttributeEvent attributeEvent) -
processElectricityProducerWindAssetAttributeEvent
protected void processElectricityProducerWindAssetAttributeEvent(org.openremote.model.attribute.AttributeEvent attributeEvent) -
processAssetChange
protected void processAssetChange(org.openremote.model.PersistenceEvent<org.openremote.model.asset.impl.ElectricityProducerWindAsset> persistenceEvent) -
startCalculation
protected void startCalculation(org.openremote.model.asset.impl.ElectricityProducerWindAsset electricityProducerWindAsset) -
stopCalculation
-
processWeatherData
protected void processWeatherData(org.openremote.model.asset.impl.ElectricityProducerWindAsset electricityProducerWindAsset) -
calculatePower
protected double calculatePower(org.openremote.model.asset.impl.ElectricityProducerWindAsset electricityProducerWindAsset, ForecastWindService.WeatherForecastModel weatherForecastModel)
-