public class NonDeploymentUsageManager extends java.lang.Object implements UsageManager
USAGE_LISTENER_TERMINATION_TIMEOUT, USAGE_LISTENERS
Constructor and Description |
---|
NonDeploymentUsageManager(ManagementContextInternal initialManagementContext) |
Modifier and Type | Method and Description |
---|---|
void |
addUsageListener(UsageListener listener)
Adds the given listener, to be notified on recording of application/location events.
|
java.util.Set<ApplicationUsage> |
getApplicationUsage(<any> filter)
Returns the usage info for the application with the given id, or null if unknown.
|
ApplicationUsage |
getApplicationUsage(java.lang.String appId)
Returns the usage info for the application with the given id, or null if unknown.
|
java.util.Set<LocationUsage> |
getLocationUsage(<any> filter)
Returns the usage info for the location with the given id, or null if unknown.
|
LocationUsage |
getLocationUsage(java.lang.String locationId)
Returns the usage info for the location with the given id, or null if unknown.
|
void |
recordApplicationEvent(Application app,
Lifecycle state)
Adds this application event to the usage record for the given app (creating the usage
record if one does not already exist).
|
void |
recordLocationEvent(Location loc,
Lifecycle state)
Adds this location event to the usage record for the given location (creating the usage
record if one does not already exist).
|
void |
removeUsageListener(UsageListener listener)
Removes the given listener.
|
public NonDeploymentUsageManager(ManagementContextInternal initialManagementContext)
public void recordApplicationEvent(Application app, Lifecycle state)
UsageManager
recordApplicationEvent
in interface UsageManager
public void recordLocationEvent(Location loc, Lifecycle state)
UsageManager
recordLocationEvent
in interface UsageManager
public LocationUsage getLocationUsage(java.lang.String locationId)
UsageManager
getLocationUsage
in interface UsageManager
public java.util.Set<LocationUsage> getLocationUsage(<any> filter)
UsageManager
getLocationUsage
in interface UsageManager
public ApplicationUsage getApplicationUsage(java.lang.String appId)
UsageManager
getApplicationUsage
in interface UsageManager
public java.util.Set<ApplicationUsage> getApplicationUsage(<any> filter)
UsageManager
getApplicationUsage
in interface UsageManager
public void addUsageListener(UsageListener listener)
UsageManager
addUsageListener
in interface UsageManager
public void removeUsageListener(UsageListener listener)
UsageManager
removeUsageListener
in interface UsageManager