Interface ModelAccessProvider
- All Known Subinterfaces:
ConnectorInputTypeTranslator<T,,S> ConnectorOutputTypeTranslator<S,T>
- All Known Implementing Classes:
AbstractConnectorInputTypeTranslator,AbstractConnectorOutputTypeTranslator,ChanneledConnectorOutputTypeAdapter,ConnectorInputTypeAdapter,ConnectorOutputTypeAdapter
public interface ModelAccessProvider
Refines the
TypeTranslator for the use with machine connectors.- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA simple (optional) function that may throw anIOException.static interfaceA simple (optional) function that may throw anIOException. -
Method Summary
Modifier and TypeMethodDescriptionReturns the model access instance to be used during type translations.static booleanoptional(ModelAccess modelAccess, ModelAccessProvider.IOVoidFunction func) Executesfuncbut consumesIOExceptionas execution is considered optional.static ModelAccessoptionalStep(ModelAccess modelAccess, ModelAccessProvider.IOModelAccessFunction func) Executesfuncbut consumesIOExceptionas execution is considered optional.voidsetModelAccess(ModelAccess modelAccess) Defines the model access.
-
Method Details
-
getModelAccess
ModelAccess getModelAccess()Returns the model access instance to be used during type translations.- Returns:
- the model access instance, may be null (see
MachineConnector.hasModel())
-
setModelAccess
Defines the model access. Handle with care, shall be called (indirectly) by the connector only.- Parameters:
modelAccess- the model access
-
optional
Executesfuncbut consumesIOExceptionas execution is considered optional.- Parameters:
modelAccess- the model access to be passed intofuncfunc- the function to execute- Returns:
truefor success without exception,falsefor failed with caught exception
-
optionalStep
static ModelAccess optionalStep(ModelAccess modelAccess, ModelAccessProvider.IOModelAccessFunction func) Executesfuncbut consumesIOExceptionas execution is considered optional.- Parameters:
modelAccess- the model access to be passed intofuncfunc- the function to execute- Returns:
modelAccessor some nested model access function to continue with
-