com.latencybusters.lbm
Class LBMMonitorSource

java.lang.Object
  extended by com.latencybusters.lbm.LBMMonitorSource

public class LBMMonitorSource
extends java.lang.Object

LBMMonitorSource class.


Constructor Summary
LBMMonitorSource(int formatter, java.lang.String formatOpts, int transport, java.lang.String transportOpts)
          Create an LBM Monitoring Source Controller.
 
Method Summary
 void close()
          Destroy a source monitoring controller.
protected  void finalize()
           
 void sample()
          Gather statistics for on-demand objects.
 void start(LBMContext lbmctx, java.lang.String appSourceId, int secs)
          Register a context for monitoring.
 void start(LBMEventQueue lbmevq, java.lang.String appSourceId, int secs)
          Register an event queue for monitoring.
 void start(LBMReceiver lbmrcv, java.lang.String appSourceId, int secs)
          Register a receiver for monitoring.
 void start(LBMSource lbmsrc, java.lang.String appSourceId, int secs)
          Register a source for monitoring.
 void stop(LBMContext lbmctx)
          Terminate monitoring for a context.
 void stop(LBMEventQueue lbmevq)
          Terminate monitoring for an event queue.
 void stop(LBMReceiver lbmrcv)
          Terminate monitoring for a receiver.
 void stop(LBMSource lbmsrc)
          Terminate monitoring for a source.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LBMMonitorSource

public LBMMonitorSource(int formatter,
                        java.lang.String formatOpts,
                        int transport,
                        java.lang.String transportOpts)
                 throws LBMException
Create an LBM Monitoring Source Controller. This creates an instance of an LBM Monitoring Source Controller. On some JVMs this object may be garbage collected prematurely if it is not referenced after creation; therefore, it may be prudent to explicitly call its close method at a point in the program logic where it would no longer be required.

Parameters:
formatter - Format module type
formatOpts - A block of data which is passed to the format module's initialization function. This may be used to pass configuration options to the format module.
transport - Transport module type
transportOpts - A block of data which is passed to the transport module's initialization function. This may be used to pass configuration options to the transport module.
Throws:
LBMException - if any error occurs creating the monitor source.
See Also:
close()
Method Detail

finalize

protected void finalize()
                 throws LBMException
Overrides:
finalize in class java.lang.Object
Throws:
LBMException

close

public void close()
           throws LBMException
Destroy a source monitoring controller. Destroys a monitoring controller. Any contexts, sources, or receivers currently registered to the controller will be automatically unregistered.

Throws:
LBMException - if any error occurs destroying the monitor source.

start

public void start(LBMContext lbmctx,
                  java.lang.String appSourceId,
                  int secs)
           throws LBMException
Register a context for monitoring. Monitoring may be done at regular intervals, specified by the secs parameter. As an alternative, passing zero for secs will not automatically monitor the context, but instead require an explicit call to the sample() method.

If monitoring is to be used as a form of heartbeat, the preferred method is to call the sample() method from a context thread or event queue timer callback. This ensures that the object actually processing the messages is the one generating the monitoring statistics, guaranteeing that it is truly acting as a heartbeat mechanism.

Parameters:
lbmctx - LBMContext to be monitored
appSourceId - String containing an application-specified source identifier. If null or an empty string is passed, the application name will be used.
secs - Interval (in seconds) at which monitoring information will be gathered and sent. If zero, the context will not be automatically monitored, but instead will be monitored upon a call to the sample() method.
Throws:
LBMException - if any error occurs enabling monitoring for the context.

start

public void start(LBMReceiver lbmrcv,
                  java.lang.String appSourceId,
                  int secs)
           throws LBMException
Register a receiver for monitoring. Monitoring may be done at regular intervals, specified by the secs parameter. As an alternative, passing zero for secs will not automatically monitor the context, but instead require an explicit call to the sample() method.

If monitoring is to be used as a form of heartbeat, the preferred method is to call the sample() method from a context thread or event queue timer callback. This ensures that the object actually processing the messages is the one generating the monitoring statistics, guaranteeing that it is truly acting as a heartbeat mechanism.

Parameters:
lbmrcv - LBMReceiver to be monitored
appSourceId - String containing an application-specified source identifier. If null or an empty string is passed, the application name will be used.
secs - Interval (in seconds) at which monitoring information will be gathered and sent. If zero, the receiver will not be automatically monitored, but instead will be monitored upon a call to the sample() method.
Throws:
LBMException - if any error occurs enabling monitoring for the receiver.

start

public void start(LBMSource lbmsrc,
                  java.lang.String appSourceId,
                  int secs)
           throws LBMException
Register a source for monitoring. Monitoring may be done at regular intervals, specified by the secs parameter. As an alternative, passing zero for secs will not automatically monitor the source, but instead require an explicit call to the sample() method.

If monitoring is to be used as a form of heartbeat, the preferred method is to call the sample() method from a context thread or event queue timer callback. This ensures that the object actually processing the messages is the one generating the monitoring statistics, guaranteeing that it is truly acting as a heartbeat mechanism.

Parameters:
lbmsrc - LBMSource to be monitored
appSourceId - String containing an application-specified source identifier. If null or an empty string is passed, the application name will be used.
secs - Interval (in seconds) at which monitoring information will be gathered and sent. If zero, the source will not be automatically monitored, but instead will be monitored upon a call to the sample() method.
Throws:
LBMException - if any error occurs enabling monitoring for the source.

start

public void start(LBMEventQueue lbmevq,
                  java.lang.String appSourceId,
                  int secs)
           throws LBMException
Register an event queue for monitoring. Monitoring may be done at regular intervals, specified by the secs parameter. As an alternative, passing zero for secs will not automatically monitor the source, but instead require an explicit call to the sample() method.

If monitoring is to be used as a form of heartbeat, the preferred method is to call the sample() method from a context thread or event queue timer callback. This ensures that the object actually processing the messages is the one generating the monitoring statistics, guaranteeing that it is truly acting as a heartbeat mechanism.

Parameters:
lbmevq - LBMEventQueue to be monitored
appSourceId - String containing an application-specified source identifier. If null or an empty string is passed, the application name will be used.
secs - Interval (in seconds) at which monitoring information will be gathered and sent. If zero, the source will not be automatically monitored, but instead will be monitored upon a call to the sample() method.
Throws:
LBMException - if any error occurs enabling monitoring for the event queue.

stop

public void stop(LBMContext lbmctx)
          throws LBMException
Terminate monitoring for a context. Unregister a context to prevent further monitoring of that context.

Parameters:
lbmctx - Previously registered LBMContext
Throws:
LBMException - if any error occurs disabling monitoring for the context.

stop

public void stop(LBMReceiver lbmrcv)
          throws LBMException
Terminate monitoring for a receiver. Unregister a receiver to prevent further monitoring of that receiver.

Parameters:
lbmrcv - Previously registered LBMReceiver
Throws:
LBMException - if any error occurs disabling monitoring for the receiver.

stop

public void stop(LBMSource lbmsrc)
          throws LBMException
Terminate monitoring for a source. Unregister a source to prevent further monitoring of that source.

Parameters:
lbmsrc - Previously registered LBMSource
Throws:
LBMException - if any error occurs disabling monitoring for the source.

stop

public void stop(LBMEventQueue lbmevq)
          throws LBMException
Terminate monitoring for an event queue. Unregister an event queue to prevent further monitoring of that event queue.

Parameters:
lbmevq - Previously registered LBMEventQueue
Throws:
LBMException - if any error occurs disabling monitoring for the event queue.

sample

public void sample()
            throws LBMException
Gather statistics for on-demand objects.

Throws:
LBMException - if any error occurs gathering statistics.


All of the documentation and software included in this and any other Informatica Inc "Ultra Messaging" Release is Copyright (C) 2004-2014, Informatica Corporation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted only as covered by the terms of a valid software license agreement with 29West Inc. Copyright © 2004-2014, Informatica, Inc. All Rights Reserved.