FileDocCategorySizeDatePackage
CallFlowMonitor.javaAPI DocGlassfish v2 API18819Fri May 04 22:30:52 BST 2007com.sun.appserv.management.monitor

CallFlowMonitor

public interface CallFlowMonitor implements Monitoring
Provides CallFlow Monitoring information as well as enables/disables CallFlow Monitoring.

Fields Summary
public static final String
J2EE_TYPE
The j2eeType as returned by {@link com.sun.appserv.management.base.AMX#getJ2EEType}.
public static final String
REQUEST_ID_KEY
Key accessing a container-generated Unique ID used by {@link #queryCallStackForRequest} and {@link #queryPieInformation}
public static final String
TIME_STAMP_KEY
TimeStamp obtained from {@link java.lang.System#nanoTime}
public static final String
TIME_STAMP_MILLIS_KEY
public static final String
REQUEST_TYPE_KEY
The type of the Incoming request. An incoming request is the container that the request came into the Appserver. Container types are the following types
  • {@link #REMOTE_ASYNC_MESSAGE}
  • {@link #REMOTE_EJB}
  • {@link #REMOTE_WEB}
  • {@link #REMOTE_WEB_SERVICE}
  • {@link #TIMER_EJB}
public static final String
REMOTE_ASYNC_MESSAGE
Remote Aysnchronous Message Request Type. Typically incoming {@link #MESSAGE_DRIVEN_BEAN} Calls
public static final String
REMOTE_EJB
Remote EJB Request Type
public static final String
REMOTE_WEB
Remote Web Request Type
public static final String
REMOTE_WEB_SERVICE
Remote Web Service Request Type
public static final String
TIMER_EJB
Timer EJB Request Type
public static final String
COMPONENT_TYPE_KEY
The type of the component where the call is in. Container types are the following types
  • {@link #BEAN_MANAGED_PERSISTENCE}
  • {@link #CONTAINER_MANAGED_PERSISTENCE}
  • {@link #MESSAGE_DRIVEN_BEAN}
  • {@link #SERVLET}
  • {@link #SERVLET_FILTER}
  • {@link #STATEFUL_SESSION_BEAN}
  • {@link #STATELESS_SESSION_BEAN}
public static final String
SERVLET
Servlet Component Type
public static final String
SERVLET_FILTER
Servlet Filter Component Type
public static final String
STATELESS_SESSION_BEAN
Stateless Session Bean Component Type
public static final String
STATEFUL_SESSION_BEAN
Stateful Session Bean Component Type
public static final String
BEAN_MANAGED_PERSISTENCE
Bean Managed Persistence Component Type
public static final String
CONTAINER_MANAGED_PERSISTENCE
Container Managed Persistence Component Type
public static final String
MESSAGE_DRIVEN_BEAN
Message Driven Bean Component Type
public static final String
CONTAINER_TYPE_KEY
The type of the container where the call originated
public static final String
WEB_CONTAINER
Web Container
public static final String
EJB_CONTAINER
EJB Container
public static final String
ORB
ORB Container
public static final String
WEB_APPLICATION
WEB Application Container
public static final String
EJB_APPLICATION
EJB Application Container
public static final String
OTHER
OTHER Container, containers that are not monitored for callflow
public static final String
USER_KEY
Username of the Caller making a request.
public static final String
STATUS_KEY
Status of the request.
public static final String
CLIENT_HOST_KEY
The client host from where the request came in.
public static final String
METHOD_NAME_KEY
Name of the method invoked to service a request.
public static final String
COMPONENT_NAME_KEY
Name of component invoked to service a request.
public static final String
MODULE_NAME_KEY
Name of the module invoked to service a request.
public static final String
APPLICATION_NAME_KEY
Name of application invoked to service a request.
public static final String
RESPONSE_TIME_KEY
Response time for a particular request.
public static final String
THREAD_ID_KEY
Thread ID used for a particular request.
public static final String
TRANSACTION_ID_KEY
Transaction ID for a particular request
public static final String
EXCEPTION_KEY
Exception (if any) for the request. String reprsentation of {@link java.lang.Throwable}
public static final String
CALL_STACK_ROW_TYPE_KEY
This is the key for the row type returned by the {@link #queryCallStackForRequest} method. There are four types of rows returned each signifying the RequestStart, MethodStart, MethodEnd and RequestEnd information. The values of the CallStackRowType are as follows
  • {@link #CALL_STACK_REQUEST_START}
  • {@link #CALL_STACK_REQUEST_END}
  • {@link #CALL_STACK_METHOD_START}
  • {@link #CALL_STACK_METHOD_END}
public static final String
CALL_STACK_REQUEST_START
Value of type of a row returned by {@link #queryCallStackForRequest} method. Keyed by {@link #CALL_STACK_ROW_TYPE_KEY} This represents information pertaining to start of a incoming request in the container.
public static final String
CALL_STACK_REQUEST_END
Value of type of a row returned by {@link #queryCallStackForRequest} method. Keyed by {@link #CALL_STACK_ROW_TYPE_KEY} This represents information pertaining to end of a incoming request in the container.
public static final String
CALL_STACK_METHOD_START
Value of type of a row returned by {@link #queryCallStackForRequest} method. Keyed by {@link #CALL_STACK_ROW_TYPE_KEY} This represents information pertaining to start of a method for a incoming request in the container.
public static final String
CALL_STACK_METHOD_END
Value of type of a row returned by {@link #queryCallStackForRequest} method. Keyed by {@link #CALL_STACK_ROW_TYPE_KEY} This represents information pertaining to method end of a incoming request in the container.
public static final String
EJB_CONTAINER_TYPE
Used in {@link #queryPieInformation}. Denotes the time spent by a particular request in the EJB Container
public static final String
WEB_CONTAINER_TYPE
Used in {@link #queryPieInformation}. Denotes the time spent by a particular request in the Web Container
public static final String
ORB_LAYER_EJB_CONTAINER_TYPE
Used in {@link #queryPieInformation}. Denotes the time spent by a particular request in the ORB layer in EJB Container.
public static final String
EJB_APPLICATION_TYPE
Used in {@link #queryPieInformation}. Denotes the time spent by a particular request in a users EJB application code. This time is different from the time spent in the EJB or ORB Container code.
public static final String
WEB_APPLICATION_TYPE
Used in {@link #queryPieInformation}. Denotes the time spent by a particular request in a users Web Application code. This time is different from the time spent in the Web Container code.
public static final String
CONNECTOR_CONTAINER_TYPE
Used in {@link #queryPieInformation}. Denotes the time spent by a particular request in the connector layer.
Constructors Summary
Methods Summary
public voidclearData()
Deletes all the data that was collected during the last callflow run from the database

public booleandeleteRequestIDs(java.lang.String[] requestId)
Delete a list of request ids.

param
requestId an array of request ids. Request IDs are obtained using the {@link #REQUEST_ID_KEY} from {@link #queryRequestInformation}

public java.lang.StringgetCallerIPFilter()
Gets the at-source IP filter set up on this particular Server Instance. An At-source filter, filters the Call Flow Data at Data Collection Time. of the type of filter and value is a String value.

return
String the string representation of the IP filter set for this instance.

public java.lang.StringgetCallerPrincipalFilter()
Gets the at-source Principal filter for this particular Server Instance.

return
String The Principal Name that is filtered for.

public booleangetEnabled()

return
true if the callflow tracking is on, false otherwise

public java.util.ListqueryCallStackForRequest(java.lang.String requestID)
Returns CallStackInformation for a particular RequestID. This list is sorted on time to return a logical flow of calls through various containers for a particular requestID. Each row in the list is a Map of key=value pairs, each key and value is a @link java.lang.String respectively. The keys are of the type
  • {@link #REQUEST_ID_KEY}
  • {@link #TIME_STAMP_KEY}
  • {@link #TIME_STAMP_MILLIS_KEY}
  • {@link #REQUEST_TYPE_KEY}. This represents the Container where the call origniated in and is only available for {@link #CALL_STACK_ROW_TYPE_KEY} of the types
    • {@link #CALL_STACK_REQUEST_START}
    There are 5 values for the {@link #REQUEST_TYPE_KEY}
    
    • {@link #REMOTE_ASYNC_MESSAGE}
    • {@link #REMOTE_EJB}
    • {@link #REMOTE_WEB}
    • {@link #REMOTE_WEB_SERVICE}
    • {@link #TIMER_EJB}
  • {@link #USER_KEY}
  • {@link #STATUS_KEY}
  • {@link #METHOD_NAME_KEY}
  • {@link #APPLICATION_NAME_KEY}
  • {@link #THREAD_ID_KEY}
  • {@link #TRANSACTION_ID_KEY}
  • {@link #RESPONSE_TIME_KEY}
  • {@link #EXCEPTION_KEY}
  • {@link #CONTAINER_TYPE_KEY}. This represents the container where the call is and is only available for {@link #CALL_STACK_ROW_TYPE_KEY} of the types
    • {@link #CALL_STACK_METHOD_START}
    • {@link #CALL_STACK_METHOD_END}
    There are 7 valid values for {@link #CONTAINER_TYPE_KEY}
    • {@link #BEAN_MANAGED_PERSISTENCE}
    • {@link #CONTAINER_MANAGED_PERSISTENCE}
    • {@link #MESSAGE_DRIVEN_BEAN}
    • {@link #SERVLET}
    • {@link #SERVLET_FILTER}
    • {@link #STATEFUL_SESSION_BEAN}
    • {@link #STATELESS_SESSION_BEAN}

param
requestID obtained on calling #getRequestInformation
return
List>, a list of Maps each encapsulating all information represented by the keys

public java.lang.String[]queryComponentTypeKeys()
Returns a list of component types
  • {@link #BEAN_MANAGED_PERSISTENCE}
  • {@link #CONTAINER_MANAGED_PERSISTENCE}
  • {@link #MESSAGE_DRIVEN_BEAN}
  • {@link #SERVLET}
  • {@link #SERVLET_FILTER}
  • {@link #STATEFUL_SESSION_BEAN}
  • {@link #STATELESS_SESSION_BEAN}
  • public java.lang.String[]queryContainerTypeOrApplicationTypeKeys()
    Returns a list of Container types
  • {@link #WEB_CONTAINER}
  • {@link #EJB_CONTAINER}
  • {@link #ORB}
  • {@link #WEB_APPLICATION}
  • {@link #EJB_APPLICATION}
  • {@link #OTHER}
  • public java.util.MapqueryPieInformation(java.lang.String requestID)
    Returns the "PIE" information for a requestID. The "PIE" is a simple Map with key=value pairs indicating the time spent for each call in a particular container/ The keys are of the types
  • {@link #CONTAINER_TYPE_KEY} . There are four types
    • {@link #EJB_CONTAINER_TYPE}
    • {@link #WEB_CONTAINER_TYPE}
    • {@link #ORB}
    • {@link #CONNECTOR_CONTAINER_TYPE}
    The values for the keys are String representation of time spent in each container. Time is obtained using {@link java.lang.System#currentTimeMillis}

    param
    requestID ID of the request whose PIE information is to be obtained.
    return
    Map

    public java.util.ListqueryRequestInformation()
    Gets information for requests. Each row in the list is a Map of key=value pairs, each key and value is a @link java.lang.String respectively. The keys are of the type
    • {@link #REQUEST_ID_KEY}
    • {@link #TIME_STAMP_MILLIS_KEY}
    • {@link #REQUEST_TYPE_KEY}. There are 5 types
      • {@link #REMOTE_ASYNC_MESSAGE}
      • {@link #REMOTE_EJB}
      • {@link #REMOTE_WEB}
      • {@link #REMOTE_WEB_SERVICE}
      • {@link #TIMER_EJB}
    • {@link #USER_KEY}
    • {@link #STATUS_KEY}
    • {@link #CLIENT_HOST_KEY}
    • {@link #METHOD_NAME_KEY}
    • {@link #APPLICATION_NAME_KEY}
    • {@link #RESPONSE_TIME_KEY}

    return
    List>, a list of Maps each encapsulating all information represented by the keys

    public java.lang.String[]queryRequestTypeKeys()
    Returns a list of all request types
    • {@link #REMOTE_ASYNC_MESSAGE}
    • {@link #REMOTE_EJB}
    • {@link #REMOTE_WEB}
    • {@link #REMOTE_WEB_SERVICE}
    • {@link #TIMER_EJB}

    public voidsetCallerIPFilter(java.lang.String filter)
    Sets the at-source IP filter for this particular Server Instance.

    param
    filter The ip address to filter on.

    public voidsetCallerPrincipalFilter(java.lang.String filter)
    Sets the at-source Principal filter for this particular Server Instance.

    param
    filter The Principal Name to filter on.

    public voidsetEnabled(boolean enabled)
    Turns CallFlow On or Off

    param
    enabled true to enable call flow tracking