Package net.sf.eBus.client.monitor
Class RQThreadReport.Builder
- java.lang.Object
-
- net.sf.eBus.messages.EMessageObject.Builder<M>
-
- net.sf.eBus.messages.EMessage.Builder<M,B>
-
- net.sf.eBus.messages.ENotificationMessage.Builder<RQThreadReport,RQThreadReport.Builder>
-
- net.sf.eBus.client.monitor.RQThreadReport.Builder
-
- Enclosing class:
- RQThreadReport
public static final class RQThreadReport.Builder extends ENotificationMessage.Builder<RQThreadReport,RQThreadReport.Builder>
Use this builder to create anRQThreadReport
instance. A new builder instance is obtained viaRQThreadReport.builder()
.
-
-
Field Summary
-
Fields inherited from class net.sf.eBus.messages.ENotificationMessage.Builder
mPosition, mPubId
-
Fields inherited from class net.sf.eBus.messages.EMessageObject.Builder
mTargetClass
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RQThreadReport
buildImpl()
ReturnsRQThread
report notification based onthis
builder's field settings.RQThreadReport.Builder
jvmIdentifier(java.lang.String jvmId)
Sets JVM identifier to given value.RQThreadReport.Builder
runQueueThreads(RQThreadInfo[] rqThreads)
Sets run queue thread information array to given value.protected Validator
validate(Validator problems)
Checks if JVM identifier and run queue thread information array are set.-
Methods inherited from class net.sf.eBus.messages.ENotificationMessage.Builder
position, publisherId
-
Methods inherited from class net.sf.eBus.messages.EMessage.Builder
copy, subject, timestamp, timestamp
-
Methods inherited from class net.sf.eBus.messages.EMessageObject.Builder
build
-
-
-
-
Method Detail
-
validate
protected Validator validate(Validator problems)
Checks if JVM identifier and run queue thread information array are set. Failure to set both fields or the necessaryENotificationMessage
fields results in an invalid report.- Overrides:
validate
in classEMessage.Builder<RQThreadReport,RQThreadReport.Builder>
- Parameters:
problems
- place validation failures into this list.- Returns:
problems
- See Also:
Validator
-
buildImpl
protected RQThreadReport buildImpl()
ReturnsRQThread
report notification based onthis
builder's field settings.- Specified by:
buildImpl
in classEMessageObject.Builder<RQThreadReport>
- Returns:
- new
RQThreadReport
notification.
-
jvmIdentifier
public RQThreadReport.Builder jvmIdentifier(java.lang.String jvmId)
Sets JVM identifier to given value. This value should uniquely identify the JVM reporting the run queue thread information. May not benull
or an empty string.- Parameters:
jvmId
- JVM identifier.- Returns:
this Builder
instance.- Throws:
java.lang.IllegalArgumentException
- ifjvmId
is eithernull
or an empty string.
-
runQueueThreads
public RQThreadReport.Builder runQueueThreads(RQThreadInfo[] rqThreads)
Sets run queue thread information array to given value.- Parameters:
rqThreads
- run queue thread information.- Returns:
this Builder
instance.- Throws:
java.lang.NullPointerException
- ifrqThreads
isnull
.java.lang.IllegalArgumentException
- ifrqThreads
is an empty array.
-
-