com.apptelemetry.apm
Class APMApplication

java.lang.Object
  extended by com.apptelemetry.apm.APMApplication

public class APMApplication
extends java.lang.Object


Constructor Summary
APMApplication(java.lang.String applName, java.lang.String applId, java.lang.String applTier, java.lang.String applTierId)
          Create a new Software-Telemetry application and register it on the app.telemetry Server.
 
Method Summary
 void AttachContext(byte[] context)
          Call AttachContext to restore the context acquired through GetContext in another thread or process.
 void CreateContext(java.lang.String filterValue)
          Call CreateContext to create a new Software-Telemetry context.
 byte[] GetContext()
          Call GetContext to get a context handle, which can be passed to another threads or processes.
static APMApplication GetCurrent()
           
 byte[] GetSyncMark()
          Call GetSyncMark to get a synchronization handle that can be passed to another thread or process to synchronize control flow.
 boolean HasActiveContext(byte level)
          Call HasActiveContext to test, if a software-telemetry session is active for some logging level.
 void RegisterFilterValue(java.lang.String filterValue, java.lang.String filterDescription)
          Call RegisterFilterValue for each valid filter value.
 void ReleaseContext()
          Call ReleaseContext to finish logging and to flush logged information to the STRUDL infrastructure.
 void Report(java.lang.String filterValue, java.lang.String reportKey, java.lang.String description)
          Call STRUDLReport to create a new feedback report.
 void ReportContent(java.lang.String reportKey, java.lang.String filename, java.lang.String mimetype, byte[] content)
          Call ReportContent to add binary values to a previously created feedback report.
 void ReportValue(java.lang.String reportKey, java.lang.String key, java.lang.String value)
          Call ReportValue to add values to a previously created feedback report.
 void SetSyncMark(byte[] syncMark)
          Call SetSyncMark to pass a synchronization handle you got from GetSyncMark for synchronizing the sequence of events.
 void SyncContext(byte[] context)
          Call SyncContext to mark the return point of a synchronous call to another thread or process.
 void Unregister()
          Call Unregister to cleanup data structures immediately.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

APMApplication

public APMApplication(java.lang.String applName,
                      java.lang.String applId,
                      java.lang.String applTier,
                      java.lang.String applTierId)
Create a new Software-Telemetry application and register it on the app.telemetry Server. (Each new application object is associated with a new application handle.)

Parameters:
applName - (String) The name of the application.
applId - (String) The ID of the application.
applTier - (String) For multi-tiered applications pass the name of the tier to be registered.
applTierId - (String) For multi-tiered applications pass the ID of the tier to be registered. This ID needs to be unique for a certain applTier.
Method Detail

GetCurrent

public static APMApplication GetCurrent()

Unregister

public void Unregister()
Call Unregister to cleanup data structures immediately. Otherwise Unregister will be called on Object destruction by JVM. Be careful that the object may be referenced by the native JNI library so you should always use the unregister function explicitly.


RegisterFilterValue

public void RegisterFilterValue(java.lang.String filterValue,
                                java.lang.String filterDescription)
Call RegisterFilterValue for each valid filter value.

Parameters:
filterValue - Filter string that identifies the filter.
filterDescription - Description string of the filter.

CreateContext

public void CreateContext(java.lang.String filterValue)
Call CreateContext to create a new Software-Telemetry context. If the filter value matches a currently started session filter, logging is started for the thread which calls this API function. Make sure to call ReleaseContext when exiting the context.

Parameters:
filterValue - Filter string valid for the context to be created.

AttachContext

public void AttachContext(byte[] context)
Call AttachContext to restore the context acquired through GetContext in another thread or process.

Parameters:
context - Context handle.

GetContext

public byte[] GetContext()
Call GetContext to get a context handle, which can be passed to another threads or processes. This context information is used by the analysis components to track the control flow through the distributed environment.

Returns:
Context handle.

SyncContext

public void SyncContext(byte[] context)
Call SyncContext to mark the return point of a synchronous call to another thread or process. The ReleaseContext event of the called thread or function is assumed to be issued before the call of SyncContext. Pass the context handle you have used when calling the thread or process.

Parameters:
context - Context handle.

ReleaseContext

public void ReleaseContext()
Call ReleaseContext to finish logging and to flush logged information to the STRUDL infrastructure. Make sure to call ReleaseContext when exiting the context.


GetSyncMark

public byte[] GetSyncMark()
Call GetSyncMark to get a synchronization handle that can be passed to another thread or process to synchronize control flow.

Returns:
Synchronization handle.

SetSyncMark

public void SetSyncMark(byte[] syncMark)
Call SetSyncMark to pass a synchronization handle you got from GetSyncMark for synchronizing the sequence of events.

Parameters:
syncMark - Synchronization handle.

HasActiveContext

public boolean HasActiveContext(byte level)
Call HasActiveContext to test, if a software-telemetry session is active for some logging level. This information should be used to avoid costly operations preparing parameters for events that are currently not logged.

Parameters:
level - Logging level to be checked.
Returns:
True in case logging is activated, otherwise false.

Report

public void Report(java.lang.String filterValue,
                   java.lang.String reportKey,
                   java.lang.String description)
Call STRUDLReport to create a new feedback report. The STRUDLReport function may be called more than one time. The descriptions of calls with equal filter values and nonempty key values will be collected.

Parameters:
filterValue - (String) The filter value will be matched to the description using the registered filter values.
reportKey - (String) A key value may be generated by the calling application to associate further descriptions to a feedback. If empty, a new feedback report will be generated on each call.
description - (String) Textual description of the feedback entered by the user or generated by the application.

ReportValue

public void ReportValue(java.lang.String reportKey,
                        java.lang.String key,
                        java.lang.String value)
Call ReportValue to add values to a previously created feedback report. Data will be added as key/value-pairs and associated to the report using the key-values. The key value is limited to 128 characters, the value is limited to 32 kBytes.

Parameters:
reportKey - (String) The reportkey parameter of the previously issued Report function call
key - (String) Key of the Key/Value pair
value - (String) Value of the Key/Value pair

ReportContent

public void ReportContent(java.lang.String reportKey,
                          java.lang.String filename,
                          java.lang.String mimetype,
                          byte[] content)
Call ReportContent to add binary values to a previously created feedback report. The filename value is limited to 128 characters.

Parameters:
reportKey - (String) The reportkey parameter of the previously issued Report function call
filename - (String) Filename to store the content under
mimetype - (String) MIME-Type of content (e.g.: text/plain, image/png, ...)
content - (byte []) Content value


Copyright © 2010, Fabasoft AG.