public abstract class WriteObject
extends java.lang.Object
Constructor and Description |
---|
WriteObject() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
isNull()
Is there a defined value?.
|
void |
notifyError(OpenemsException e)
Notify error while setting the value.
|
void |
notifySuccess()
Notify success for setting the value.
|
void |
notifyTimeout()
Notify a timeout for setting the value.
|
WriteObject |
onError(java.util.function.Consumer<OpenemsException> callback)
Callback on error while setting the value.
|
WriteObject |
onFirstError(java.util.function.Consumer<OpenemsException> callback)
Callback on first error while setting the value.
|
WriteObject |
onFirstSuccess(java.lang.Runnable callback)
Callback on first successful setting of the value.
|
WriteObject |
onSuccess(java.lang.Runnable callback)
Callback on successful setting of the value.
|
WriteObject |
onTimeout(java.lang.Runnable callback)
Callback on timeout while setting the value.
|
abstract void |
setNextWriteValue(WriteChannel<?> writeChannel)
Set the next write value of the Channel.
|
abstract java.lang.String |
valueToString()
Gets the value as a String for logging purposes.
|
public WriteObject onSuccess(java.lang.Runnable callback)
callback
- a callback Runnable
public WriteObject onFirstSuccess(java.lang.Runnable callback)
callback
- a callback Runnable
public WriteObject onError(java.util.function.Consumer<OpenemsException> callback)
callback
- a callback Runnable
public WriteObject onFirstError(java.util.function.Consumer<OpenemsException> callback)
callback
- a callback Runnable
public WriteObject onTimeout(java.lang.Runnable callback)
callback
- a callback Runnable
public void notifySuccess()
public void notifyError(OpenemsException e)
e
- the OpenemsException
public void notifyTimeout()
public abstract void setNextWriteValue(WriteChannel<?> writeChannel) throws OpenemsError.OpenemsNamedException
writeChannel
- the WriteChannel
OpenemsError.OpenemsNamedException
- on errorpublic abstract java.lang.String valueToString()
public abstract boolean isNull()