io.sarl.api.probing
Interface Probe<T>
Type Parameters:
T - the type of value that is obtained by the probe.
All Known Implementing Classes:
AbstractFieldProbe<T>, AbstractProbe<T>, BigDecimalFieldProbe, BigIntegerFieldProbe, BooleanFieldProbe, ByteFieldProbe, CharacterFieldProbe, DoubleFieldProbe, FloatFieldProbe, IntegerFieldProbe, LongFieldProbe, ReferenceFieldProbe<T>, ShortFieldProbe
interface Probe<T>
Probe implementation.
Parameters:
<T> - the type of value that is obtained by the probe.
Maven Group Identifier:
io.sarl.sdk
Maven Artifact Identifier:
api.probing
Since:
0.12
Property Summary
Modifier and type Property and description
java.lang.String name
Replies the name of the probe
java.lang.Class<T> type
The type of the value.
java.net.URI uri
Replies the probed component.
T value
Replies the probed value.
Action Summary
Modifier and type Action and description
abstract void addProbeListener(IProbeListener)
Add listener on probe changes.
abstract void addProbeReleaseListener(IProbeReleaseListener)
Add listener on probe release.
abstract java.lang.String getName
Replies the name of the probe
abstract java.lang.Class<T> getType
The type of the value.
abstract java.net.URI getUri
Replies the probed component.
abstract T getValue
Replies the probed value.
abstract boolean isActive
Replies if this probe is active.
abstract boolean isInvalid
Replies if this probe is invalid.
abstract void release
Releases any resource associated to the probe.
abstract void removeProbeListener(IProbeListener)
Remove listener on probe changes.
abstract void removeProbeReleaseListener(IProbeReleaseListener)
Remove listener on probe release.
abstract void setValue(T)
Change the probed value.
abstract void sync([boolean],[boolean])
Force the synchronization of the probed value.
Property Details
name
val name : java.lang.String
Replies the name of the probe

This property is an alias for the action: getName

type
val type : java.lang.Class<T>
The type of the value.

This property is an alias for the action: getType

uri
val uri : java.net.URI
Replies the probed component.

This property is an alias for the action: getUri

value
var value : T
Replies the probed value.

This property is an alias for the action: getValue

Action Details
addProbeListener(IProbeListener)
def addProbeListener(IProbeListener)
Add listener on probe changes.
addProbeReleaseListener(IProbeReleaseListener)
def addProbeReleaseListener(IProbeReleaseListener)
Add listener on probe release.
getName
def getName : java.lang.String
Replies the name of the probe
getType
def getType : java.lang.Class<T>
The type of the value.
getUri
def getUri : java.net.URI
Replies the probed component.
getValue
def getValue : T
Replies the probed value.
isActive
def isActive : boolean
Replies if this probe is active. When a probe is active, it could be synchronized to the probed element.
Returns:
true if the probe is active.
isInvalid
def isInvalid : boolean
Replies if this probe is invalid. When a probe is invalid, the exhibited value may not corresponds to the probed element's value.
Returns:
true if the probe is invalid.
release
def release
Releases any resource associated to the probe.
removeProbeListener(IProbeListener)
def removeProbeListener(IProbeListener)
Remove listener on probe changes.
removeProbeReleaseListener(IProbeReleaseListener)
def removeProbeReleaseListener(IProbeReleaseListener)
Remove listener on probe release.
setValue(T)
def setValue(T)
Change the probed value.
Parameters:
v - the new value.
sync([boolean],[boolean])
def sync([boolean],[boolean])
Force the synchronization of the probed value.

The synchronization does nothing if the probe is inactive.
Parameters:
forceReading - indicates if the reading of the probed value must be forced from the probed element. By default, the value of this parameter is true.
forceIfInactiveObject - indicates if the synchronization must be done even if the probe is inactive; By default, the value of this parameter is false.