|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.server.mon.SrvMonUtil
public final class SrvMonUtil
Contains utilities to maintain a SrvMonHeartbeat object.
Constructor Summary | |
---|---|
SrvMonUtil()
|
Method Summary | |
---|---|
static void |
addGaugeValue(SrvMonUserGaugeStat srvMonUserGaugeStat,
IStats.Gauge gauge)
Sets the value from a IStats.Gauge into a SrvMonUserGaugeStat . |
static boolean |
addMonAppBusBindingInfo(SrvMonAppInfo appInfo,
SrvMonAppBusBindingInfo busBindingInfo)
Add bus binding information to an app information object |
static boolean |
addMonAppBusChannelInfo(SrvMonAppBusBindingInfo busBindingInfo,
SrvMonAppBusChannelInfo busChannelInfo)
Add an app channel information object to a bus binding information object. |
static boolean |
addMonAppBusChannelInfo(SrvMonAppInfo appInfo,
String busBindingName,
SrvMonAppBusChannelInfo busChannelInfo)
Add an app channel information object to a bus information object. |
static boolean |
addMonAppClientInfo(SrvMonAppInfo appInfo,
SrvMonAppClientInfo clientInfo)
Add an app client information object to an app's information object. |
static boolean |
addMonAppFlowInfo(SrvMonAppInfo appInfo,
SrvMonAppFlowInfo appFlowInfo)
Add an app flow information object to an app's information object. |
static SrvMonArgumentType |
convertToArgumentType(Class<?> targetType)
Converts a primitive method parameter type to an SrvMonArgumentType |
static SrvMonOptionType |
convertToOptionType(Class<?> targetType)
Converts a primitive method parameter type to an SrvMonOptionType |
static SrvMonReturnType |
convertToReturnType(Class<?> targetType)
Converts a method return type to a SrvMonReturnType |
static SrvMonAppBusBindingInfo |
createMonAppBusBindingInfo(String busBindingName)
Create a new app bus binding information object |
static SrvMonAppBusChannelInfo |
createMonAppBusChannelInfo(String busChannelName,
boolean joined)
Create a new app channel information object |
static SrvMonAppClientInfo |
createMonAppClientInfo(String clientName)
Create a new app client information object. |
static SrvMonAppFlowInfo |
createMonAppFlowInfo(int flowid)
Create a new app flow information object |
static void |
formatTraceRecordTo(SrvMonTraceRecord traceRecord,
Appendable sb)
Formats a trace record. |
static Object |
getGaugeValue(SrvMonUserGaugeStat srvMonUserGaugeStat)
Gets the value from a SrvMonUserGaugeStat as an object. |
static SrvMonAppBusBindingInfo |
getMonAppBusBindingInfo(SrvMonAppInfo appInfo,
String busBindingName)
Find an app bus binding information object in an app's information object |
static Object |
getResponseValue(SrvMonInvokeCommandResponse response)
Unpacks the return value from a SrvMonInvokeCommandResponse. |
static PktPacket |
prepareMonAppBusBindingCreateMessage(String appName,
SrvMonAppBusBindingInfo busBindingInfo)
Prepare an app bus binding create event message. |
static PktPacket |
prepareMonAppBusBindingDestroyMessage(String appName,
String busBindingName)
Prepare an app bus binding destroy event message. |
static PktPacket |
prepareMonAppBusBindingStateChangeMessage(String appName,
String busBindingName,
SrvMonAppBusBindingState newState)
Prepare an app bus binding state change event message |
static PktPacket |
prepareMonAppBusChannelClosedMessage(String appName,
String busBindingName,
String busChannelName)
Prepare an app bus channel closed event message. |
static PktPacket |
prepareMonAppBusChannelOpenedMessage(String appName,
String busBindingName,
SrvMonAppBusChannelInfo busChannelInfo)
Prepare an app bus channel opened event message. |
static PktPacket |
prepareMonAppClientConnectMessage(String appName,
SrvMonAppClientInfo clientInfo)
Prepare an app client connect event message. |
static PktPacket |
prepareMonAppClientDisconnectMessage(String appName,
String clientName)
Prepare an app client disconnect event message. |
static PktPacket |
prepareMonAppFlowCreateMessage(String appName,
SrvMonAppFlowInfo appFlowInfo)
Prepare an app flow create event message. |
static PktPacket |
prepareMonAppLoadedMessage(SrvMonAppInfo appInfo)
Prepare a new app loaded event message |
static PktPacket |
prepareMonAppStateChangeMessage(SrvMonAppInfo appInfo)
Prepare an app state change event message |
static PktPacket |
prepareMonAppUnloadedMessage(String appName)
Prepare an app unloaded event message |
static SrvMonHeartbeatMessage |
prepareMonHeartbeatMessage(long statsCollectionStartWallTime,
long statsCollectionStartTime,
long statsCollectionEndTime,
String serverName,
SrvMonSysStats sysStats,
XCollection<SrvMonPoolStats> poolStats,
XCollection<SrvMonAdminClientStats> adminClientStats,
XCollection<SrvMonAppInfo> appsInfo,
XCollection<SrvMonAppStats> appsStats)
Prepare a server heartbeat message. |
static void |
printCommmandUsage(ISrvMonCommandDescription command,
Appendable builder)
Appends command usage to an Appendable |
static boolean |
removeMonAppBusBindingInfo(SrvMonAppInfo appInfo,
String busBindingName)
Remove an app's binding information object from the app's information object. |
static boolean |
removeMonAppBusChannelInfo(SrvMonAppInfo appInfo,
String busBindingName,
String busChannelName)
Remove an app channel information object from a bus information object. |
static boolean |
removeMonAppClientInfo(SrvMonAppInfo appInfo,
String clientName)
Remove an app's client information object from an app's information object. |
static PktPacket |
serializeToPacket(IRogMessage message,
boolean disposeMessage)
|
static void |
setBackingMessage(AepApplicationExceptionEvent event)
|
static void |
setBackingMessage(AepBusBindingCreatedEvent event)
|
static void |
setBackingMessage(AepBusBindingCreateFailedEvent event)
|
static void |
setBackingMessage(AepBusBindingDestroyedEvent event)
|
static void |
setBackingMessage(AepBusBindingDownEvent event)
|
static void |
setBackingMessage(AepBusBindingOpenedEvent event)
|
static void |
setBackingMessage(AepBusBindingOpenFailedEvent event)
|
static void |
setBackingMessage(AepBusBindingOpeningEvent event)
|
static void |
setBackingMessage(AepBusBindingUpEvent event)
|
static void |
setBackingMessage(AepChannelDownEvent event)
|
static void |
setBackingMessage(AepChannelUpEvent event)
|
static void |
setBackingMessage(AepDuplicateAcknowledgementAlertEvent event)
|
static void |
setBackingMessage(AepEngineActiveEvent event)
|
static void |
setBackingMessage(AepEngineCreatedEvent event)
|
static void |
setBackingMessage(AepEngineStartedEvent event)
|
static void |
setBackingMessage(AepEngineStoppedEvent event)
|
static void |
setBackingMessage(AepEngineStoppingEvent event)
|
static void |
setBackingMessage(AepInboundLogExceptionEvent event)
|
static void |
setBackingMessage(AepMessageTraceLoggingExceptionEvent event)
|
static void |
setBackingMessage(AepMessagingFailedEvent event)
|
static void |
setBackingMessage(AepMessagingPrestartEvent event)
|
static void |
setBackingMessage(AepMessagingStartedEvent event)
|
static void |
setBackingMessage(AepMessagingStartFailedEvent event)
|
static void |
setBackingMessage(AepOutboundLogExceptionEvent event)
|
static void |
setBackingMessage(AepOutOfOrderSendCommitCompletionAlertEvent event)
|
static void |
setBackingMessage(AepSendExceptionEvent event)
|
static void |
setBackingMessage(AepStatsAlertEvent event)
|
static void |
setBackingMessage(AepStuckAlertEvent event)
|
static void |
setBackingMessage(AepUnhandledMessageEvent event)
|
static void |
setBackingMessage(MessageBusBindingReconnectedEvent event)
|
static void |
setBackingMessage(MessageBusBindingReconnectingEvent event)
|
static void |
setBackingMessage(com.neeve.ods.impl.StoreBindingFailedEvent event)
|
static void |
setBackingMessage(com.neeve.ods.impl.StoreBindingRoleChangedEvent event)
|
static void |
setBackingMessage(com.neeve.ods.impl.StoreMemberDownEvent event)
|
static void |
setBackingMessage(com.neeve.ods.impl.StoreMemberInitCompleteEvent event)
|
static void |
setBackingMessage(com.neeve.ods.impl.StoreMemberUpEvent event)
|
static void |
setBackingMessage(com.neeve.ods.impl.StoreTransactionLogRepairedEvent event)
|
static void |
setBackingMessage(UnhandledMessageEvent event)
|
static boolean |
updateMonAppBusBindingState(SrvMonAppInfo appInfo,
String busBindingName,
SrvMonAppBusBindingState newState)
Update an app's binding information state |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SrvMonUtil()
Method Detail |
---|
public static final PktPacket serializeToPacket(IRogMessage message, boolean disposeMessage)
public static final SrvMonAppBusBindingInfo createMonAppBusBindingInfo(String busBindingName)
busBindingName
- The name of the bus binding whose info to createpublic static final boolean addMonAppBusBindingInfo(SrvMonAppInfo appInfo, SrvMonAppBusBindingInfo busBindingInfo)
appInfo
- The app information objectbusBindingInfo
- The bus binding information to add
public static final SrvMonAppBusBindingInfo getMonAppBusBindingInfo(SrvMonAppInfo appInfo, String busBindingName)
appInfo
- The app's info object to look in.busBindingName
- The name of the bus binding whose information to findpublic static final boolean updateMonAppBusBindingState(SrvMonAppInfo appInfo, String busBindingName, SrvMonAppBusBindingState newState)
appInfo
- The app info object in which to update the binding infobusBindingName
- The name of the bus binding whose info to updatenewState
- The new state.
public static final boolean removeMonAppBusBindingInfo(SrvMonAppInfo appInfo, String busBindingName)
appInfo
- The app info object from which to remove the binding info objectbusBindingName
- The name of the bus binding whose information to remove.
public static final SrvMonAppBusChannelInfo createMonAppBusChannelInfo(String busChannelName, boolean joined)
busChannelName
- The name of the channel.joined
- True if the channel has been joined.public static final boolean addMonAppBusChannelInfo(SrvMonAppBusBindingInfo busBindingInfo, SrvMonAppBusChannelInfo busChannelInfo)
busBindingInfo
- The bus binding information object to add to.busChannelInfo
- The channel info object to add.
public static final boolean addMonAppBusChannelInfo(SrvMonAppInfo appInfo, String busBindingName, SrvMonAppBusChannelInfo busChannelInfo)
appInfo
- The app information object in which to add.busBindingName
- The name of the bus binding whose information object to add.busChannelInfo
- The bus channel info.
public static final boolean removeMonAppBusChannelInfo(SrvMonAppInfo appInfo, String busBindingName, String busChannelName)
appInfo
- The app information object from which to remove.busBindingName
- The name of the bus binding whose information object to remove.busChannelName
- The channel to remove.
public static final SrvMonAppClientInfo createMonAppClientInfo(String clientName)
clientName
- The name of the new client.public static final boolean addMonAppClientInfo(SrvMonAppInfo appInfo, SrvMonAppClientInfo clientInfo)
appInfo
- The app information object in which to add the client info object.clientInfo
- The client information object to add.
public static final boolean removeMonAppClientInfo(SrvMonAppInfo appInfo, String clientName)
appInfo
- The app information object from which to remove the client info object.clientName
- The name of the client whose information object to remove.
public static final SrvMonAppFlowInfo createMonAppFlowInfo(int flowid)
flowid
- The flow id.public static final boolean addMonAppFlowInfo(SrvMonAppInfo appInfo, SrvMonAppFlowInfo appFlowInfo)
appInfo
- The app information object in which to add the flow info object.appFlowInfo
- The flow information object to add.
public static final PktPacket prepareMonAppLoadedMessage(SrvMonAppInfo appInfo)
appInfo
- The app information used to prepare the message.public static final PktPacket prepareMonAppStateChangeMessage(SrvMonAppInfo appInfo)
appInfo
- The app information used to prepare the message.public static final PktPacket prepareMonAppBusBindingCreateMessage(String appName, SrvMonAppBusBindingInfo busBindingInfo)
appName
- The name of the app to which the bus binding belongs.busBindingInfo
- The app's bus binding information object used
to prepare the message.public static final PktPacket prepareMonAppBusBindingStateChangeMessage(String appName, String busBindingName, SrvMonAppBusBindingState newState)
appName
- The name of the app to which the bus binding belongs.busBindingName
- The name of the bus binding whose state has changed.newState
- The new bus state.public static final PktPacket prepareMonAppBusBindingDestroyMessage(String appName, String busBindingName)
appName
- The name of the app to which the bus binding belongs.busBindingName
- The name of the bus binding what was destroyed.public static final PktPacket prepareMonAppBusChannelOpenedMessage(String appName, String busBindingName, SrvMonAppBusChannelInfo busChannelInfo)
appName
- The name of the app to which the channel belongs.busBindingName
- The name of the bus binding to which the channel belongs.busChannelInfo
- The channel information object to use to prepare the message.public static final PktPacket prepareMonAppBusChannelClosedMessage(String appName, String busBindingName, String busChannelName)
appName
- The name of the app to which the channel belongs.busBindingName
- The name of the bus binding to which the channel belongs.busChannelName
- The name of the channel for which to prepare the message.public static final PktPacket prepareMonAppClientConnectMessage(String appName, SrvMonAppClientInfo clientInfo)
appName
- The name app to which the client connected.clientInfo
- The client information object used to prepare the messagepublic static final PktPacket prepareMonAppClientDisconnectMessage(String appName, String clientName)
appName
- The name app from which the client disconnected.clientName
- The name of the disconnected client.public static final PktPacket prepareMonAppFlowCreateMessage(String appName, SrvMonAppFlowInfo appFlowInfo)
appName
- The name app to which the flow is established.appFlowInfo
- The flow information object used to prepare the messagepublic static final PktPacket prepareMonAppUnloadedMessage(String appName)
appName
- The name of the unloaded app.public static final SrvMonHeartbeatMessage prepareMonHeartbeatMessage(long statsCollectionStartWallTime, long statsCollectionStartTime, long statsCollectionEndTime, String serverName, SrvMonSysStats sysStats, XCollection<SrvMonPoolStats> poolStats, XCollection<SrvMonAdminClientStats> adminClientStats, XCollection<SrvMonAppInfo> appsInfo, XCollection<SrvMonAppStats> appsStats)
statsCollectionStartWallTime
- The wall time, in milliseconds, when stats collection was startedstatsCollectionStartTime
- The time, in nanoseconds, stats collection was startedstatsCollectionEndTime
- The time, in nanoseconds, stats collection was endedsysStats
- The system statstics.poolStats
- The pool statistics.adminClientStats
- The admin client statistics.appsInfo
- The app information objects.appsStats
- The app statistics.public static void addGaugeValue(SrvMonUserGaugeStat srvMonUserGaugeStat, IStats.Gauge gauge)
IStats.Gauge
into a SrvMonUserGaugeStat
.
srvMonUserGaugeStat
- The SrvMonUserGaugeStat
gauge
- The Gauge with the value to add.public static Object getGaugeValue(SrvMonUserGaugeStat srvMonUserGaugeStat)
This method returns null if the type of the Gauge is unknown.
null
if the type is unknown.public static final void setBackingMessage(AepBusBindingCreatedEvent event)
public static final void setBackingMessage(AepBusBindingCreateFailedEvent event)
public static final void setBackingMessage(AepEngineCreatedEvent event)
public static final void setBackingMessage(com.neeve.ods.impl.StoreMemberUpEvent event)
public static final void setBackingMessage(com.neeve.ods.impl.StoreMemberInitCompleteEvent event)
public static final void setBackingMessage(AepEngineStartedEvent event)
public static final void setBackingMessage(AepBusBindingOpeningEvent event)
public static final void setBackingMessage(AepBusBindingOpenedEvent event)
public static final void setBackingMessage(AepBusBindingOpenFailedEvent event)
public static final void setBackingMessage(AepChannelUpEvent event)
public static final void setBackingMessage(AepBusBindingUpEvent event)
public static final void setBackingMessage(AepMessagingPrestartEvent event)
public static final void setBackingMessage(AepMessagingStartedEvent event)
public static final void setBackingMessage(AepMessagingStartFailedEvent event)
public static final void setBackingMessage(AepEngineActiveEvent event)
public static final void setBackingMessage(com.neeve.ods.impl.StoreBindingRoleChangedEvent event)
public static final void setBackingMessage(com.neeve.ods.impl.StoreMemberDownEvent event)
public static final void setBackingMessage(com.neeve.ods.impl.StoreBindingFailedEvent event)
public static final void setBackingMessage(AepChannelDownEvent event)
public static final void setBackingMessage(AepBusBindingDownEvent event)
public static final void setBackingMessage(AepMessagingFailedEvent event)
public static final void setBackingMessage(AepBusBindingDestroyedEvent event)
public static final void setBackingMessage(AepEngineStoppedEvent event)
public static void setBackingMessage(AepEngineStoppingEvent event)
public static final void setBackingMessage(com.neeve.ods.impl.StoreTransactionLogRepairedEvent event)
public static final void setBackingMessage(AepDuplicateAcknowledgementAlertEvent event)
public static final void setBackingMessage(AepInboundLogExceptionEvent event)
public static final void setBackingMessage(AepOutboundLogExceptionEvent event)
public static final void setBackingMessage(AepOutOfOrderSendCommitCompletionAlertEvent event)
public static final void setBackingMessage(AepSendExceptionEvent event)
public static final void setBackingMessage(AepStatsAlertEvent event)
public static final void setBackingMessage(AepStuckAlertEvent event)
public static final void setBackingMessage(UnhandledMessageEvent event)
public static final void setBackingMessage(AepMessageTraceLoggingExceptionEvent event)
public static final void setBackingMessage(AepUnhandledMessageEvent event)
public static final void setBackingMessage(MessageBusBindingReconnectingEvent event)
public static final void setBackingMessage(MessageBusBindingReconnectedEvent event)
public static final void setBackingMessage(AepApplicationExceptionEvent event)
public static final SrvMonArgumentType convertToArgumentType(Class<?> targetType)
targetType
- a command parameter type.
public static final SrvMonReturnType convertToReturnType(Class<?> targetType)
targetType
- a command return type.
public static final SrvMonOptionType convertToOptionType(Class<?> targetType)
targetType
- a command parameter type.
public static final void printCommmandUsage(ISrvMonCommandDescription command, Appendable builder)
Appendable
builder
- The Appendable
public static final void formatTraceRecordTo(SrvMonTraceRecord traceRecord, Appendable sb)
traceRecord
- The trace record.sb
- The targetpublic static Object getResponseValue(SrvMonInvokeCommandResponse response)
response
- The response containing the value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |