|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectWorkArea
com.ibm.datapower.wamt.clientAPI.Manager
public class Manager
A singleton that is the root management object that starts and stops all other management objects/daemons. This object should exist for the duration of the management, which basically means "always". When working with the clientAPI, you must start with the Manager object.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT_2009_2013
|
static int |
DEFAULT_MAX_VERSIONS_TO_STORE
The maximum number of versions to store in the repository before the oldest ones are purged from the system. |
static java.lang.String |
OPTION_AMP_CONNECT_TIMEOUT
When first invoking getInstance(Map) , use this as the option
name when designating the number of milliseconds to monitor each AMP connect
request to avoid a hang condition. |
static java.lang.String |
OPTION_COLLECT_DAEMON_PROGRESSES
When first invoking getInstance(Map) , use this as the option
name when designating a Boolean object that indicates if you would like
the heartbeat daemon to put ProgressContainers in a queue to be collected
by the caller. |
static java.lang.String |
OPTION_COLLECT_DOMAIN_SYNCH_PROGRESSES
When first invoking getInstance(Map) , use this as the option
name when designating a Boolean object that indicates if you would like
the domain synchronization to put ProgressContainers in a queue to be collected
by the caller. |
static java.lang.String |
OPTION_COMMANDS_IMPL
When first invoking getInstance(Map) , use this as the option
name when designating the name of the class that implements the
Commands interface for AMPv1. |
static java.lang.String |
OPTION_COMMANDS_SOMA_IMPL
When first invoking getInstance(Map) , use this as the option
name when designating the name of the class that implements the
Commands interface for SOMA. |
static java.lang.String |
OPTION_COMMANDS_V2_IMPL
When first invoking getInstance(Map) , use this as the option
name when designating the name of the class that implements the
Commands interface for AMPv2. |
static java.lang.String |
OPTION_COMMANDS_V3_IMPL
When first invoking getInstance(Map) , use this as the option
name when designating the name of the class that implements the
Commands interface for AMPv3. |
static java.lang.String |
OPTION_COMMANDS_XC10_IMPL
When first invoking getInstance(Map) , use this as the option
name when designating the name of the class that implements the
Commands interface for AMPv2. |
static java.lang.String |
OPTION_CREDENTIAL
When first invoking getInstance(Map) , use this as the option
name when designating a reference to an object that implements the
Credential interface and contains the values that will pass
authentication and authorization tests to permit the current user to use
the Manager. |
static java.lang.String |
OPTION_DEBUG_CAPTURE_VERSION_BLOB
When first invoking getInstance(Map) , use this as the option
name when designating a Boolean object that indicates if you would like
the DomainVersion and DeploymentPolicyVersion blobs to be captured to disk
in the root directory but outside of the repository. |
static java.lang.String |
OPTION_DEBUG_DEVICE_QUIESCE_TIMEOUT
|
static java.lang.String |
OPTION_DEBUG_DISABLE_HEARTBEAT
When first invoking getInstance(Map) , use this as the option
name when designating a Boolean object that indicates if you would like
the heartbeat activity to not occur, meaning that heartbeating is
disabled. |
static java.lang.String |
OPTION_DEBUG_DOMAIN_QUIESCE_TIMEOUT
|
static java.lang.String |
OPTION_DEVICE_LOG_PORT
When first invoking getInstance(Map) , use this as the option
name when designating the port for device logs. |
static java.lang.String |
OPTION_DOMAIN_SYNCHRONIZATION_INTERVAL
When first invoking getInstance(Map) , use this as the option
name when designating the number of milliseconds in the period that a
DomainSynchronization task should wait before probing a device again. |
static java.lang.String |
OPTION_DOMAIN_SYNCHRONIZATION_RETRY_MAX
When first invoking getInstance(Map) , use this as the option
name when designating the number of times to retry a failed domain synchronization task. |
static java.lang.String |
OPTION_DOMAIN_SYNCHRONIZATION_THREAD_POOL_SIZE
When first invoking getInstance(Map) , use this as the option
name when designating the number of threads that should be in the pool
for DomainSynchronization Tasks to run on. |
static java.lang.String |
OPTION_HEARTBEAT_INTERVAL
When first invoking getInstance(Map) , use this as the option
name when designating the number of milliseconds in the period that a
HeartbeatTask should wait before probing a device again. |
static java.lang.String |
OPTION_HEARTBEAT_THREAD_POOL_SIZE
When first invoking getInstance(Map) , use this as the option
name when designating the number of threads that should be in the pool
for HeartbeatTasks to run on. |
static java.lang.String |
OPTION_HTTP_LISTENER_IP_ADDRESS
When first invoking getInstance(Map) , use this as the option
name when designating the IP address that the HTTP Listener can be
reached at by the device for retrieving files. |
static java.lang.String |
OPTION_HTTP_LISTENER_IP_INTERFACE
When first invoking getInstance(Map) , use this as the option
name when designating the name of the interface that the HTTP Listener can be
reached at by the device for retrieving files. |
static java.lang.String |
OPTION_HTTP_LISTENER_IP_PORT
When first invoking getInstance(Map) , use this as the option
name when designating the IP port number that the HTTP Listener
should listen on for file requests from devices. |
static java.lang.String |
OPTION_HTTP_LISTENER_SOCKET_TIMEOUT
When first invoking getInstance(Map) , use this as the option
name when designating the IP port number that the HTTP Listener
should listen on for file requests from devices. |
static java.lang.String |
OPTION_MESSAGE_PREFIX
When first invoking getInstance(Map) , use this as the option
name when designating prefix for all messages
* |
static java.lang.String |
OPTION_NOTIFICATION_CATCHER_IMPL
When first invoking getInstance(Map) , use this as the option
name when designating the name of the class that implements the
NotificationCatcher interface. |
static java.lang.String |
OPTION_NOTIFICATION_CATCHER_IP_ADDRESS
When first invoking getInstance(Map) , use this as the option
name when designating the IP address that the NotificationCatcher can be
reached at by the device for the sending of events. |
static java.lang.String |
OPTION_NOTIFICATION_CATCHER_IP_INTERFACE
When first invoking getInstance(Map) , use this as the option
name when designating the name of the interface that the NotificationCatcher can be
reached at by the device for the sending of events. |
static java.lang.String |
OPTION_NOTIFICATION_CATCHER_NO_SSL
When first invoking getInstance(Map) , use this as the option
name when designating if the NotificationCatcher should be listening
with a non-SSL server socket. |
static java.lang.String |
OPTION_NOTIFICATION_CATCHER_PORT
When first invoking getInstance(Map) , use this as the option
name when designating the IP port number that the NotificationCatcher
should listen on for events from devices. |
static java.lang.String |
OPTION_REPOSITORY_IMPL
When first invoking getInstance(Map) , use this as the option
name when designating the name of the class that implements the
Repository interface. |
static java.lang.String |
OPTION_SIGNAL_CONNECT_TIMEOUT
When first invoking getInstance(Map) , and if you want a
third-party SOAP service to be signaled (receive a message) just before
and immediately after a change (firmware or domain) is
deployed to a device, this would specify the connect timeout of the
third-party SOAP service. |
static java.lang.String |
OPTION_SIGNAL_DELAY_TIME
When first invoking getInstance(Map) , and if you want a
third-party SOAP service to be signaled (receive a message) just before
and immediately after a change (firmware or domain) is
deployed to a device, this would specify the sleep time after posting to
the third-party SOAP service before continuing on to deploy the change. |
static java.lang.String |
OPTION_SIGNAL_RESPONSE_TIMEOUT
When first invoking getInstance(Map) , and if you want a
third-party SOAP service to be signaled (receive a message) just before
and immediately after a change (firmware or domain) is
deployed to a device, this would specify the timeout of waiting for a
response from the third-party SOAP service. |
static java.lang.String |
OPTION_SIGNAL_SOAP_ACTION
When first invoking getInstance(Map) , and if you want a
third-party SOAP service to be signaled (receive a message) just before
and immediately after a change (firmware or domain) is
deployed to a device, this would specify the value for the SOAPAction
header of the third-party SOAP service. |
static java.lang.String |
OPTION_SIGNAL_URL
When first invoking getInstance(Map) , and if you want a
third-party SOAP service to be signaled (receive a message) just before
and immediately after a change (firmware or domain) is
deployed to a device, this would specify the URL of the third-party SOAP
service. |
static java.lang.String |
OPTION_SOAPHELPER_IMPL
When first invoking getInstance(Map) , use this as the option
name when designating the name of the class that implements the
SOAPHelper interface for AMPv1. |
static java.lang.String |
OPTION_SOAPHELPER_SOMA_IMPL
When first invoking getInstance(Map) , use this as the option
name when designating the name of the class that implements the
SOAPHelper interface for AMPv2. |
static java.lang.String |
OPTION_SOAPHELPER_V2_IMPL
When first invoking getInstance(Map) , use this as the option
name when designating the name of the class that implements the
SOAPHelper interface for AMPv2. |
static java.lang.String |
OPTION_SOAPHELPER_V3_IMPL
When first invoking getInstance(Map) , use this as the option
name when designating the name of the class that implements the
SOAPHelper interface for AMPv2. |
static java.lang.String |
OPTION_TASK_QUEUE_SIZE
When first invoking getInstance(Map) , use this as the option
name when designating an Integer object that indicates how big you would
like the background task queue to be. |
static java.lang.String |
OPTION_TRUSTSTORE_FILENAME
When first invoking getInstance(Map) , use this as an option
to specify the filename of the key store for the manager to use in it's truststore. |
static java.lang.String |
OPTION_TRUSTSTORE_PASSWORD
When first invoking getInstance(Map) , use this as an option
to specify the password for the key store specified in Configuration.KEY_TRUSTSTORE_FILENAME |
static boolean |
SAVE_FORCED
When invoking save(boolean) , use this value to indicate that
the new values held by this process should overwrite whatever may have
been changed by another vehicle. |
static boolean |
SAVE_UNFORCED
When invoking save(boolean) , use this value to indicate that if
the persistence has forked (a change in data was made by another vehicle
after it was loaded here), that the method should focus on data
consistency and fail the save operation. |
static java.lang.String |
version
|
Method Summary | |
---|---|
void |
addDomainSyncTaskInProgress(java.lang.String key,
DomainSynchronizationTask value)
|
ProgressContainer |
addFirmware(Blob image,
java.lang.String userComment)
Create a BackgroundTask to add a new firmware image to the manager. |
void |
enqueue(BackgroundTask backgroundTask,
WorkArea workArea)
Enqueue a BackgroundTask object to be processed by the Manager. |
void |
enqueue(Notification notification,
WorkArea workArea)
Enqueue a Notification object to be processed by the Manager. |
ProgressContainer |
exportAll(java.io.OutputStream outputStream)
Export everything in the manager datastore to the specified OutputStream. |
void |
generateReport(java.lang.String filePath,
java.lang.String fileName)
Generate a report that will capture the domain configuration deployments completed successfully. |
Device[] |
getAllDevices()
Gets the list of all known devices in the manager, independent of being assigned to a ManagedSet. |
Firmware |
getBestFirmware(DeviceType deviceType,
ModelType modelType,
StringCollection deviceFeatures,
java.lang.String level)
Get the best Firmware that is suitable for the specified deviceType, modelType, and device features. |
static Manager |
getByPrimaryKey(java.lang.String targetKey)
Get the Manager that has the specified primary key. |
Device |
getDeviceBySerialNumber(java.lang.String targetSerialNumber)
Deprecated. Get a Device that has a particular hardware serial number. This method does not care if the Device is a member of a ManagedSet or not. |
Device |
getDeviceBySymbolicName(java.lang.String targetSymbolicName)
Get a Device that has a particular symbolic name. |
static java.util.logging.Logger |
getDeviceLogger()
Get the logger for distributed device logging. |
Device[] |
getDevicesBySerialNumber(java.lang.String targetSerialNumber)
Get all Devices that have a particular hardware serial number. |
static java.util.logging.Logger |
getDmiLogger()
Get the parent of all the loggers. |
Queue |
getDomainSynchronizaionProgresses()
Get a reference to the Queue that holds the ProgressContainers created by the domain synchronization daemon. |
long |
getDomainSynchronizationDaemonSleepMS()
Get the sleep interval of the DomainSynchronization daemon in milliseconds. |
java.util.Hashtable<java.lang.String,DomainSynchronizationTask> |
getDomainSyncTasksInProgress()
|
Firmware |
getFirmware(DeviceType deviceType,
ModelType modelType,
StringCollection strictFeatures,
StringCollection nonstrictFeatures)
For a specified device profile (deviceType, modelType, strictFeatures, nonStrictFeatures), get the Firmware object that would match that device profile. |
Firmware[] |
getFirmwares()
Get a list of all the Firmware objects that are in the manager. |
long |
getHeartbeatDaemonSleepMS()
Get the sleep interval of the heartbeat daemon in milliseconds. |
Queue |
getHeartbeatProgresses()
Get a reference to the Queue that holds the MacroProgressContainers created by the heartbeat daemon. |
static Manager |
getInstance(java.util.Map options)
Get an instance of the manager. |
java.lang.String |
getLineSeparator()
|
static java.lang.String |
getLoggerGroupName()
Get the name of the group that is assigned to all loggers. |
ManagedSet |
getManagedSet(java.lang.String name)
Get the existing ManagedSet that has the specified name from the manager. |
ManagedSet[] |
getManagedSets()
Get a list of all the ManagedSets in the manager. |
static ManagerStatus |
getManagerStatus()
Get the status of the Manager. |
int |
getMaxVersionsToStore()
Gets the maximum number of versions of any one object that the manager will try to keep. |
java.net.URL |
getNotificationCatcherURL()
Get the URL that the NotificationCatcher will use when subscribing to Devices in ManagedSets. |
Queue |
getNotificationProgresses()
Get a reference to the Queue that holds the MacroProgressContainers created by Notification tasks. |
java.lang.String |
getPrimaryKey()
|
java.lang.String |
getSubscriptionId()
Get the subscription id that this manager uses with devices. |
java.lang.String |
getSubscriptionId(boolean isPrimary)
|
java.util.Set<Taggable> |
getTaggedByName(java.lang.String name)
Get all tagged resources by tag name. |
java.util.Set<Taggable> |
getTaggedByNameValue(java.lang.String name,
java.lang.String value)
Get all resources tagged with a given name and value. |
java.util.Set<java.lang.String> |
getTagNames()
Get all unique tag names, return an empty set if no tags have been added |
java.util.Set<java.lang.String> |
getTagValues(java.lang.String name)
Get all unique tag values for a given tag name. |
Device[] |
getUnmanagedDevices(DeviceType desiredDeviceType,
ModelType desiredModelType,
StringCollection desiredFeatures)
Gets the list of known devices in the manager that are not assigned to a ManagedSet. |
java.lang.String |
getVersion()
Returns the version of this WAMT image as a String |
void |
importAll(java.io.InputStream inputStream)
Import to the manager datastore from the specified InputStream. |
void |
remove(Device device)
Removes a device from the manager. |
void |
remove(Firmware firmware)
Remove a Firmware object from the Manager. |
void |
remove(ManagedSet managedSet)
Remove an existing ManagedSet from the Manager. |
void |
removeDomainSyncTaskInProgress(java.lang.String task)
|
void |
save(boolean force)
Explicitly persist the Manager's content to a datastore. |
void |
setDomainSynchronizationDaemonSleepMS(long ms)
Change the sleep interval for the DomainSynchronization daemon. |
void |
setHeartbeatDaemonSleepMS(long ms)
Set the sleep interval of the heartbeat daemon. |
void |
setMaxVersionsToStore(int maxVersions)
Set the maximum number of versions of any one object that should be kept in the manager. |
void |
shutdown()
Shutdown the Manager. |
java.lang.String |
toString()
Get a String representation of this object for the purpose of debugging or tracing. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String version
public static final boolean SAVE_UNFORCED
save(boolean)
, use this value to indicate that if
the persistence has forked (a change in data was made by another vehicle
after it was loaded here), that the method should focus on data
consistency and fail the save operation.
SAVE_FORCED
,
Constant Field Valuespublic static final boolean SAVE_FORCED
save(boolean)
, use this value to indicate that
the new values held by this process should overwrite whatever may have
been changed by another vehicle.
SAVE_UNFORCED
,
Constant Field Valuespublic static final java.lang.String OPTION_COMMANDS_IMPL
getInstance(Map)
, use this as the option
name when designating the name of the class that implements the
Commands
interface for AMPv1.
Configuration.KEY_COMMANDS_IMPL
,
Constant Field Valuespublic static final java.lang.String OPTION_MESSAGE_PREFIX
getInstance(Map)
, use this as the option
name when designating prefix for all messages
*
Configuration.KEY_MESSAGE_PREFIX
,
Constant Field Valuespublic static final java.lang.String OPTION_COMMANDS_V2_IMPL
getInstance(Map)
, use this as the option
name when designating the name of the class that implements the
Commands
interface for AMPv2.
Configuration.KEY_COMMANDS_V2_IMPL
,
Constant Field Valuespublic static final java.lang.String OPTION_COMMANDS_V3_IMPL
getInstance(Map)
, use this as the option
name when designating the name of the class that implements the
Commands
interface for AMPv3.
Configuration.KEY_COMMANDS_V3_IMPL
,
Constant Field Valuespublic static final java.lang.String OPTION_COMMANDS_SOMA_IMPL
getInstance(Map)
, use this as the option
name when designating the name of the class that implements the
Commands
interface for SOMA.
Configuration.KEY_COMMANDS_SOMA_IMPL
,
Constant Field Valuespublic static final java.lang.String OPTION_COMMANDS_XC10_IMPL
getInstance(Map)
, use this as the option
name when designating the name of the class that implements the
Commands
interface for AMPv2.
Configuration.KEY_COMMANDS_XC10_IMPL
,
Constant Field Valuespublic static final java.lang.String OPTION_NOTIFICATION_CATCHER_IMPL
getInstance(Map)
, use this as the option
name when designating the name of the class that implements the
NotificationCatcher
interface.
Configuration.KEY_NOTIFICATION_CATCHER_IMPL
,
Constant Field Valuespublic static final java.lang.String OPTION_REPOSITORY_IMPL
getInstance(Map)
, use this as the option
name when designating the name of the class that implements the
Repository
interface.
Configuration.KEY_REPOSITORY_IMPL
,
Constant Field Valuespublic static final java.lang.String OPTION_SOAPHELPER_IMPL
getInstance(Map)
, use this as the option
name when designating the name of the class that implements the
SOAPHelper
interface for AMPv1.
Configuration.KEY_SOAP_HELPER_IMPL
,
Constant Field Valuespublic static final java.lang.String OPTION_SOAPHELPER_V2_IMPL
getInstance(Map)
, use this as the option
name when designating the name of the class that implements the
SOAPHelper
interface for AMPv2.
Configuration.KEY_SOAP_HELPER_V2_IMPL
,
Constant Field Valuespublic static final java.lang.String OPTION_SOAPHELPER_V3_IMPL
getInstance(Map)
, use this as the option
name when designating the name of the class that implements the
SOAPHelper
interface for AMPv2.
Configuration.KEY_SOAP_HELPER_V3_IMPL
,
Constant Field Valuespublic static final java.lang.String OPTION_SOAPHELPER_SOMA_IMPL
getInstance(Map)
, use this as the option
name when designating the name of the class that implements the
SOAPHelper
interface for AMPv2.
Configuration.KEY_SOAP_HELPER_V3_IMPL
,
Constant Field Valuespublic static final java.lang.String OPTION_CREDENTIAL
getInstance(Map)
, use this as the option
name when designating a reference to an object that implements the
Credential
interface and contains the values that will pass
authentication and authorization tests to permit the current user to use
the Manager. Exactly one of these values must be supplied when invoking
that method. For example,
Credential credential = new Credential(); credential.setProperty("ExampleProperty","ExampleValue"); ... map.put(Manager.OPTION_CREDENTIAL, credential);
Credential
,
Constant Field Valuespublic static final java.lang.String OPTION_TASK_QUEUE_SIZE
getInstance(Map)
, use this as the option
name when designating an Integer object that indicates how big you would
like the background task queue to be.
Configuration.KEY_TASK_QUEUE_SIZE
,
Constant Field Valuespublic static final java.lang.String OPTION_COLLECT_DAEMON_PROGRESSES
getInstance(Map)
, use this as the option
name when designating a Boolean object that indicates if you would like
the heartbeat daemon to put ProgressContainers in a queue to be collected
by the caller.
Configuration.KEY_COLLECT_DAEMON_PROGRESSES
,
Constant Field Valuespublic static final java.lang.String OPTION_COLLECT_DOMAIN_SYNCH_PROGRESSES
getInstance(Map)
, use this as the option
name when designating a Boolean object that indicates if you would like
the domain synchronization to put ProgressContainers in a queue to be collected
by the caller.
Configuration.KEY_COLLECT_DOMAIN_SYNCH_PROGRESSES
,
Constant Field Valuespublic static final java.lang.String OPTION_DEBUG_DISABLE_HEARTBEAT
getInstance(Map)
, use this as the option
name when designating a Boolean object that indicates if you would like
the heartbeat activity to not occur, meaning that heartbeating is
disabled.
Configuration.KEY_HEARTBEAT_DISABLE
,
Constant Field Valuespublic static final java.lang.String OPTION_DEBUG_DOMAIN_QUIESCE_TIMEOUT
public static final java.lang.String OPTION_DEBUG_DEVICE_QUIESCE_TIMEOUT
public static final java.lang.String OPTION_DEBUG_CAPTURE_VERSION_BLOB
getInstance(Map)
, use this as the option
name when designating a Boolean object that indicates if you would like
the DomainVersion and DeploymentPolicyVersion blobs to be captured to disk
in the root directory but outside of the repository.
Configuration.KEY_CAPTURE_VERSION_BLOB
,
Constant Field Valuespublic static final java.lang.String OPTION_HEARTBEAT_THREAD_POOL_SIZE
getInstance(Map)
, use this as the option
name when designating the number of threads that should be in the pool
for HeartbeatTasks to run on.
Configuration.KEY_HEARTBEAT_THREAD_POOL_SIZE
,
Constant Field Valuespublic static final java.lang.String OPTION_DOMAIN_SYNCHRONIZATION_THREAD_POOL_SIZE
getInstance(Map)
, use this as the option
name when designating the number of threads that should be in the pool
for DomainSynchronization Tasks to run on.
Configuration.KEY_DOMAIN_SYNCHRONIZATION_THREAD_POOL_SIZE
,
Constant Field Valuespublic static final java.lang.String OPTION_NOTIFICATION_CATCHER_PORT
getInstance(Map)
, use this as the option
name when designating the IP port number that the NotificationCatcher
should listen on for events from devices.
Configuration.KEY_NOTIFICATION_CATCHER_IP_PORT
,
Constant Field Valuespublic static final java.lang.String OPTION_DOMAIN_SYNCHRONIZATION_INTERVAL
getInstance(Map)
, use this as the option
name when designating the number of milliseconds in the period that a
DomainSynchronization task should wait before probing a device again.
Configuration.KEY_DOMAIN_SYNCHRONIZATION_INTERVAL
,
Constant Field Valuespublic static final java.lang.String OPTION_DOMAIN_SYNCHRONIZATION_RETRY_MAX
getInstance(Map)
, use this as the option
name when designating the number of times to retry a failed domain synchronization task. Default = 2
public static final java.lang.String OPTION_HEARTBEAT_INTERVAL
getInstance(Map)
, use this as the option
name when designating the number of milliseconds in the period that a
HeartbeatTask should wait before probing a device again.
Configuration.KEY_HEARTBEAT_INTERVAL
,
Constant Field Valuespublic static final java.lang.String OPTION_AMP_CONNECT_TIMEOUT
getInstance(Map)
, use this as the option
name when designating the number of milliseconds to monitor each AMP connect
request to avoid a hang condition.
Configuration.KEY_AMP_CONNECT_TIMEOUT
,
Constant Field Valuespublic static final java.lang.String OPTION_NOTIFICATION_CATCHER_IP_ADDRESS
getInstance(Map)
, use this as the option
name when designating the IP address that the NotificationCatcher can be
reached at by the device for the sending of events. This is needed only
if the Manager is running on a multi-homed computer.
Configuration.KEY_NOTIFICATION_CATCHER_IP_ADDRESS
,
Constant Field Valuespublic static final java.lang.String OPTION_NOTIFICATION_CATCHER_IP_INTERFACE
getInstance(Map)
, use this as the option
name when designating the name of the interface that the NotificationCatcher can be
reached at by the device for the sending of events. This is needed only
if the Manager is running on a multi-homed computer.
Configuration.KEY_NOTIFICATION_CATCHER_IP_INTERFACE
,
Constant Field Valuespublic static final java.lang.String OPTION_HTTP_LISTENER_IP_PORT
getInstance(Map)
, use this as the option
name when designating the IP port number that the HTTP Listener
should listen on for file requests from devices.
Configuration.KEY_HTTP_LISTENER_IP_PORT
,
Constant Field Valuespublic static final java.lang.String OPTION_HTTP_LISTENER_SOCKET_TIMEOUT
getInstance(Map)
, use this as the option
name when designating the IP port number that the HTTP Listener
should listen on for file requests from devices.
Configuration.KEY_HTTP_LISTENER_SOCKET_TIMEOUT
,
Constant Field Valuespublic static final java.lang.String OPTION_HTTP_LISTENER_IP_ADDRESS
getInstance(Map)
, use this as the option
name when designating the IP address that the HTTP Listener can be
reached at by the device for retrieving files. This is needed only
if the Manager is running on a multi-homed computer.
Configuration.KEY_HTTP_LISTENER_IP_ADDRESS
,
Constant Field Valuespublic static final java.lang.String OPTION_HTTP_LISTENER_IP_INTERFACE
getInstance(Map)
, use this as the option
name when designating the name of the interface that the HTTP Listener can be
reached at by the device for retrieving files. This is needed only
if the Manager is running on a multi-homed computer.
Configuration.KEY_HTTP_LISTENER_IP_INTERFACE
,
Constant Field Valuespublic static final java.lang.String OPTION_DEVICE_LOG_PORT
getInstance(Map)
, use this as the option
name when designating the port for device logs.
Configuration.KEY_DEVICE_LOG_PORT
,
Constant Field Valuespublic static final java.lang.String OPTION_NOTIFICATION_CATCHER_NO_SSL
getInstance(Map)
, use this as the option
name when designating if the NotificationCatcher should be listening
with a non-SSL server socket.
Configuration.KEY_NOTIFICATION_CATCHER_NO_SSL
,
Constant Field Valuespublic static final java.lang.String OPTION_SIGNAL_URL
getInstance(Map)
, and if you want a
third-party SOAP service to be signaled (receive a message) just before
and immediately after a change (firmware or domain) is
deployed to a device, this would specify the URL of the third-party SOAP
service.
Configuration.KEY_SIGNAL_URL
,
Constant Field Valuespublic static final java.lang.String OPTION_SIGNAL_SOAP_ACTION
getInstance(Map)
, and if you want a
third-party SOAP service to be signaled (receive a message) just before
and immediately after a change (firmware or domain) is
deployed to a device, this would specify the value for the SOAPAction
header of the third-party SOAP service.
Configuration.KEY_SIGNAL_SOAP_ACTION
,
Constant Field Valuespublic static final java.lang.String OPTION_SIGNAL_CONNECT_TIMEOUT
getInstance(Map)
, and if you want a
third-party SOAP service to be signaled (receive a message) just before
and immediately after a change (firmware or domain) is
deployed to a device, this would specify the connect timeout of the
third-party SOAP service.
Configuration.KEY_SIGNAL_CONNECT_TIMEOUT
,
Constant Field Valuespublic static final java.lang.String OPTION_SIGNAL_RESPONSE_TIMEOUT
getInstance(Map)
, and if you want a
third-party SOAP service to be signaled (receive a message) just before
and immediately after a change (firmware or domain) is
deployed to a device, this would specify the timeout of waiting for a
response from the third-party SOAP service.
Configuration.KEY_SIGNAL_RESPONSE_TIMEOUT
,
Constant Field Valuespublic static final java.lang.String OPTION_SIGNAL_DELAY_TIME
getInstance(Map)
, and if you want a
third-party SOAP service to be signaled (receive a message) just before
and immediately after a change (firmware or domain) is
deployed to a device, this would specify the sleep time after posting to
the third-party SOAP service before continuing on to deploy the change.
Configuration.KEY_SIGNAL_DELAY_TIME
,
Constant Field Valuespublic static final java.lang.String OPTION_TRUSTSTORE_FILENAME
getInstance(Map)
, use this as an option
to specify the filename of the key store for the manager to use in it's truststore.
The Manager will load all the certificates from the keystore to use as
trusted certificates.
Configuration.KEY_TRUSTSTORE_FILENAME
,
Constant Field Valuespublic static final java.lang.String OPTION_TRUSTSTORE_PASSWORD
getInstance(Map)
, use this as an option
to specify the password for the key store specified in Configuration.KEY_TRUSTSTORE_FILENAME
Configuration.KEY_TRUSTSTORE_PASSWORD
,
Constant Field Valuespublic static final int DEFAULT_MAX_VERSIONS_TO_STORE
setMaxVersionsToStore(int)
.
setMaxVersionsToStore(int)
,
getMaxVersionsToStore()
,
Constant Field Valuespublic static final java.lang.String COPYRIGHT_2009_2013
Method Detail |
---|
public static Manager getInstance(java.util.Map options) throws InvalidParameterException, InvalidCredentialException, DatastoreException, AMPException, DeletedException
options
- a name value pair collection. Valid names in this
collection are listed below, refer to each name javadoc for a
description of the default and valid values. This value may be
null if all of the default option values
OPTION_CREDENTIAL
: (optional) credential used to access
the persisted datastore
OPTION_NOTIFICATION_CATCHER_IMPL
: (optional) name
of the class that implements the AMP
NotificationCatcher
interface.
The Manager will instantiate the class and call its startup
method.
See Configuration.DEFAULT_NOTIFICATION_CATCHER_IMPL
Constant
Field for the default value.
OPTION_COMMANDS_IMPL
: (optional) name of the class
that implements the AMP
Commands
interface. The Manager will
instantiate the class and call its startup method.
See Configuration.DEFAULT_COMMANDS_IMPL
Constant
Field for the default value.
OPTION_SOAPHELPER_IMPL
: (optional) name of the class
that implements the AMP
SOAPHelper
interface. The Manager will
instantiate the class and force the Commands engine to use it.
See Configuration.DEFAULT_SOAP_HELPER_IMPL
Constant
Field for the default value.
OPTION_REPOSITORY_IMPL
: (optional) name of the
class that implements the dataAPI
Repository
interface. The Manager will instantiate
the class and call its startup method.
See Configuration.DEFAULT_REPOSITORY_IMPL
Constant
Field for the default value.
OPTION_COLLECT_DAEMON_PROGRESSES
: (optional) put
ProgressContainers for the heartbeat daemons in a queue for
retrieval.
OPTION_COLLECT_DOMAIN_SYNCH_PROGRESSES
: (optional) put
ProgressContainers for the domain synchronization daemons in a queue for
retrieval. *
OPTION_TASK_QUEUE_SIZE
: (optional) set the
background task queue to a fixed bounded size.
OPTION_DEBUG_CAPTURE_VERSION_BLOB
: (optional) store
the blob files on disk for debug purposes.
OPTION_DEBUG_DISABLE_HEARTBEAT
: (optional) disable
the heartbeat deamon for debug purposes.
OPTION_MESSAGE_PREFIX
: (optional) set
the message prefix for the messages issued by the manaer
OPTION_TRUSTSTORE_FILENAME
: (optional) set
the filename for the manager to use as a truststore. The manager
will add all the certificates in the file to it's truststore.
OPTION_TRUSTSTORE_PASSWORD
: (optional) set
the password for truststore set in OPTION_TRUSTSTORE_FILENAME
.
public static ManagerStatus getManagerStatus()
ManagerStatus
for
states and life cycle.public static java.util.logging.Logger getDmiLogger()
public static java.util.logging.Logger getDeviceLogger()
public static java.lang.String getLoggerGroupName()
public java.lang.String getPrimaryKey()
public static Manager getByPrimaryKey(java.lang.String targetKey)
getInstance(Map)
.
targetKey
- the Manager that has the specified primary key. If there
is no Manager instance that has this primary key then this method
will return null.
public java.lang.String getSubscriptionId()
public java.lang.String getSubscriptionId(boolean isPrimary)
public void shutdown()
NotificationCatcher.shutdown()
,
Repository.shutdown()
public ProgressContainer exportAll(java.io.OutputStream outputStream) throws FullException
This may be a long-running method, depending on how long it takes to acquire all the locks. The locks may be held by other threads doing long-running operations.
outputStream
- where the exported data will be written
importAll(InputStream)
public void importAll(java.io.InputStream inputStream) throws AMPException, java.io.IOException, DatastoreException
This should be considered a long-running method, as it may take a while for the daemons to shutdown and restart with the new data.
inputStream
- where to read the previously exported data fromexportAll(OutputStream)
public void save(boolean force) throws DirtySaveException, DatastoreException
Some circumstances should cause the data to be saved automatically, otherwise the data should be saved only when this method is invoked by the clientAPI consumer. Automatic saves should happen when changes are triggered as the result of a long-running method, or methods invoked by daemon threads instead of the clientAPI consumer:
Manager.remove(ManagedSet)
runs in the foreground as a
short-running method and does not automatically save, but
Manager.addFirmware
runs in the background as a
long-running method and automatically does a save. It would be difficult
for the clientAPI consumer to know when to explicitly invoke
save()
because changes are occurring in the background over
a indeterminate time period.
Beware that the automatic save will save all the repository data, not just the subset of data that may have changed due to a long-running process. For this reason, it is difficult to "rollback" changes by not saving them and then restarting the Manager without a save invocation. There may have been a long-running task that triggered all the repository to be saved.
This method should be synchronized because we don't want multiple threads to be invoking it at the same time with slight time offsets, because they would be overwriting each other on the single disk storage destination, which may result in a mangled persisted store.
force
- the data to persistent storage even if the modified objects
were based on original values that were already modified by
another party. Valid values are SAVE_UNFORCED
,
SAVE_FORCED
SAVE_UNFORCED
,
SAVE_FORCED
public int getMaxVersionsToStore()
setMaxVersionsToStore(int)
.
setMaxVersionsToStore(int)
,
DEFAULT_MAX_VERSIONS_TO_STORE
public void setMaxVersionsToStore(int maxVersions) throws InvalidParameterException, DatastoreException
maxVersions
- the maximum number of versions of any one object to
keep in the manager. For example, is set to 4 then the manager
will limit itself to keeping 4 versions of firmware
and 4 versions of each domain in each managedSet.
This applies to all versioned objects: firmware, domains, and
deployment policies. A value that is less than 1 (0 or negative) means that
there is no limit and the manager will never delete versions.getMaxVersionsToStore()
public java.lang.String toString()
public Device[] getAllDevices()
getUnmanagedDevices(DeviceType, ModelType, StringCollection)
public Device[] getUnmanagedDevices(DeviceType desiredDeviceType, ModelType desiredModelType, StringCollection desiredFeatures) throws DeletedException
desiredDeviceType
- if set to null, this method will return unmanaged devices of
any DeviceType. If set to a non-null value, this method will
return all unmanaged devices that are compatible with this
desired DeviceType. See
DeviceType.isCompatibleWith(DeviceType)
for a
description of compatibility. This parameter may be combined
with the other parameters to perform a logical AND.desiredModelType
- if set to null, this method will return unmanaged devices of
any ModelType. If set to a non-null value, this method will
return all unmanaged devices that are compatible with this
desired ModelType. See
ModelType.isCompatibleWith(ModelType)
for a
description of compatibility. This parameter may be combined
with the other parameters to perform a logical AND.desiredFeatures
- if set to null, this method will return unmanaged devices of
any feature list. If set to a non-null value, this method will
return all unmanaged devices that match only this desired
feature list. This parameter may be combined with the other
parameters to perform a logical AND.
getAllDevices()
public Device getDeviceBySerialNumber(java.lang.String targetSerialNumber) throws DeletedException
targetSerialNumber
- the hardware serial number to search for.
Device.getSerialNumber()
public Device[] getDevicesBySerialNumber(java.lang.String targetSerialNumber) throws DeletedException
targetSerialNumber
- the hardware serial number to search for.
Device.getSerialNumber()
public Device getDeviceBySymbolicName(java.lang.String targetSymbolicName) throws DeletedException
targetSymbolicName
- the symbolic name to look for.
Device.getSymbolicName()
public void remove(Device device) throws NotEmptyException, NotExistException, InUseException, InvalidParameterException, NotEmptyException, DatastoreException, LockBusyException, DeletedException, FullException
device
- Device to remove from the Manager.ManagedSet.removeDevice(Device)
public ManagedSet getManagedSet(java.lang.String name) throws DatastoreException, DeletedException
name
- name of the ManagedSet as stored in the manager
ManagedSet.getName()
public ManagedSet[] getManagedSets()
public void remove(ManagedSet managedSet) throws NotEmptyException, InUseException, InvalidParameterException, DatastoreException, LockBusyException, FullException
managedSet
- the managedSet to remove from the Managerpublic ProgressContainer addFirmware(Blob image, java.lang.String userComment) throws FullException
image
- the firmware binary image to adduserComment
- a human-readable string that describes this image
Firmware.remove(Version)
,
FirmwareVersion.getFirmware()
,
"useCases section 4.3, 4.4"public Firmware[] getFirmwares()
Firmware.getVersions()
,
"useCases section 4.3, 4.4"public Firmware getFirmware(DeviceType deviceType, ModelType modelType, StringCollection strictFeatures, StringCollection nonstrictFeatures)
deviceType
- the device type that the firmware should be applicable
tomodelType
- the model type of the device that the firmware should be
applicable tostrictFeatures
- the strict features of the device that the firmware
should be applicable tononstrictFeatures
- the non-strict features of the device that the
firmware should be applicable to
public Firmware getBestFirmware(DeviceType deviceType, ModelType modelType, StringCollection deviceFeatures, java.lang.String level)
deviceType
- the type of device that you want to find a Firmware
object formodelType
- the device's model type that you want to find a Firmware
object fordeviceFeatures
- the device's features (both strict and non-strict)
that you want to find a Firmware object forlevel
- if you are looking for a specific firmware level, specify it
here and discovered Firmwares that don't already have this level
won't be included. If you aren't looking for a specific firmware
level, just set this parameter to null.
public void remove(Firmware firmware) throws InUseException, InvalidParameterException, DeletedException, DatastoreException
firmware
- the Firmware object to remove. The child FirmwareVersion
objects will be automatically found and removed from the Manager
also.public void enqueue(Notification notification, WorkArea workArea)
notification
- the notification which was received and parsed by the
NotificationCatcher.workArea
- the workArea that the device is in. There is one queue
per work area.public void enqueue(BackgroundTask backgroundTask, WorkArea workArea) throws FullException
backgroundTask
- the background task which needs to be performed.workArea
- the workArea that the device is in. There is one queue
per work area.public java.net.URL getNotificationCatcherURL()
public long getHeartbeatDaemonSleepMS()
setHeartbeatDaemonSleepMS(long)
public void setHeartbeatDaemonSleepMS(long ms)
ms
- the sleep interval of the heartbeat daemon in milliseconds.public void setDomainSynchronizationDaemonSleepMS(long ms)
ms
- the sleep interval of the DomainSynchronization daemon in milliseconds.public long getDomainSynchronizationDaemonSleepMS()
setDomainSynchronizationDaemonSleepMS(long)
,
Domain.setSynchronizationMode(DomainSynchronizationMode)
public Queue getNotificationProgresses()
getInstance(Map)
, you must
specify the option OPTION_COLLECT_DAEMON_PROGRESSES
, and use
the object value Boolean.TRUE
. If you specify that option, you
are responsible for removing MacroProgressContainers from this Queue,
otherwise the Queue will grow unbounded over the lifetime of the
NotificationCatcher daemon and consume system resources.
public Queue getDomainSynchronizaionProgresses()
getInstance(Map)
, you must specify the option
OPTION_COLLECT_DOMAIN_SYNCH_PROGRESSES
, and use the object value
Boolean.TRUE
. If you specify that option, you are responsible
for removing the ProgressContainers from this Queue, otherwise the
Queue will grow unbounded over the lifetime of the DomainSynchronizationDaemon and
consume system resources.
public Queue getHeartbeatProgresses()
getInstance(Map)
, you must specify the option
OPTION_COLLECT_DAEMON_PROGRESSES
, and use the object value
Boolean.TRUE
. If you specify that option, you are responsible
for removing the MacroProgressContainers from this Queue, otherwise the
Queue will grow unbounded over the lifetime of the HeartbeatDaemon and
consume system resources.
public void generateReport(java.lang.String filePath, java.lang.String fileName) throws java.io.IOException, InvalidParameterException, DatastoreException
filePath
- location to write the report that will be generated.fileName
- The base name of the file to be written
The filename will be appended with the current timestamp.
Example fileName: "ReportMaint1" will
be named like ReportMaint12010-04-22_03-25-13.txt - public java.lang.String getLineSeparator()
public java.lang.String getVersion()
public void addDomainSyncTaskInProgress(java.lang.String key, DomainSynchronizationTask value)
public void removeDomainSyncTaskInProgress(java.lang.String task)
public java.util.Hashtable<java.lang.String,DomainSynchronizationTask> getDomainSyncTasksInProgress()
public java.util.Set<java.lang.String> getTagNames()
public java.util.Set<java.lang.String> getTagValues(java.lang.String name) throws InvalidParameterException
name
- tag name
public java.util.Set<Taggable> getTaggedByName(java.lang.String name) throws InvalidParameterException
name
- the tag name
public java.util.Set<Taggable> getTaggedByNameValue(java.lang.String name, java.lang.String value) throws InvalidParameterException
name
- the tag namevalue
- the tag value
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |