public class ControlPanelInfo extends Object
Modifier and Type | Method and Description |
---|---|
void |
addBackendPopulatedListener(BackendPopulatedListener listener)
Adds a backend populated listener.
|
void |
addBackupCreatedListener(BackupCreatedListener listener)
Adds a backup creation listener.
|
void |
addConfigChangeListener(ConfigChangeListener listener)
Adds a configuration change listener.
|
void |
addIndexModifiedListener(IndexModifiedListener listener)
Adds an index modification listener.
|
void |
backendPopulated(Set<BackendDescriptor> backends)
Informs that a set of backends have been populated.
|
void |
backupCreated(BackupDescriptor newBackup)
Informs that a backup has been created.
|
boolean |
connectUsingLDAPS()
Tells whether we must connect to the server using LDAPS.
|
boolean |
connectUsingStartTLS()
Tells whether we must connect to the server using Start TLS.
|
HostPort |
getAdminConnectorHostPort()
Gets the Administration Connector HostPort based in what is read in the
configuration.
|
ConnectionWrapper |
getConnection()
Returns the connection to be used by the ControlPanelInfo to retrieve
monitoring and configuration information.
|
ConnectionProtocolPolicy |
getConnectionPolicy()
Returns the connection policy to be used by this ControlPanelInfo (and in
general by the control panel).
|
LDAPConnectionPool |
getConnectionPool()
Returns the connection pool to be used by the LDAP entry browsers.
|
int |
getConnectTimeout()
Returns the timeout to establish the connection in milliseconds.
|
IconPool |
getIconPool()
Returns the icon pool to be used by the LDAP entry browsers.
|
static ControlPanelInfo |
getInstance()
Returns a singleton for this instance.
|
HostPort |
getLdapHostPort()
Gets the LDAP HostPort based in what is read in the configuration.
|
HostPort |
getLdapsHostPort()
Gets the LDAPS HostPort based in what is read in the configuration.
|
HostPort |
getLocalAdminConnectorHostPort()
Gets the Administration Connector HostPort based in what is read in the local
configuration.
|
Collection<AbstractIndexDescriptor> |
getModifiedIndexes()
Returns a collection with all the modified indexes.
|
long |
getPollingPeriod()
Returns the polling period in milliseconds.
|
ServerDescriptor |
getServerDescriptor()
Returns the last ServerDescriptor that has been retrieved.
|
HostPort |
getStartTlsHostPort()
Gets the Start TLS HostPort based in what is read in the configuration.
|
Set<Task> |
getTasks()
Returns the list of tasks.
|
ApplicationTrustManager |
getTrustManager()
Returns the trust manager to be used by this ControlPanelInfo (and in
general by the control panel).
|
ConnectionWrapper |
getUserDataConnection()
Returns the connection to be used by the ControlPanelInfo to retrieve user data.
|
void |
initializeConfigurationFramework()
Initialize the new configuration framework if needed.
|
boolean |
isLocal()
Returns whether we are trying to manage the local host.
|
boolean |
mustDeregisterConfig()
Returns
true if the configuration must be deregistered and false otherwise. |
boolean |
mustReindex(AbstractIndexDescriptor index)
Tells whether an index must be reindexed or not.
|
void |
regenerateDescriptor()
Regenerates the last found ServerDescriptor object.
|
void |
registerModifiedIndex(AbstractIndexDescriptor index)
Registers an index as modified.
|
void |
registerTask(Task task)
Registers a task.
|
boolean |
removeBackendPopulatedListener(BackendPopulatedListener listener)
Removes a backend populated listener.
|
boolean |
removeBackupCreatedListener(BackupCreatedListener listener)
Removes a backup creation listener.
|
boolean |
removeConfigChangeListener(ConfigChangeListener listener)
Removes a configuration change listener.
|
boolean |
removeIndexModifiedListener(IndexModifiedListener listener)
Removes an index modification listener.
|
void |
setConnection(ConnectionWrapper connWrapper)
Sets the dir context to be used by the ControlPanelInfo to retrieve
monitoring and configuration information.
|
void |
setConnectionPolicy(ConnectionProtocolPolicy connectionPolicy)
Sets the connection policy to be used by this ControlPanelInfo (and in
general by the control panel).
|
void |
setConnectTimeout(int connectTimeout)
Sets the timeout to establish the connection in milliseconds.
|
void |
setIsLocal(boolean isLocal)
Sets whether the server is local or not.
|
void |
setMustDeregisterConfig(boolean mustDeregisterConfig)
Sets whether the configuration must be deregistered or not.
|
void |
setPollingPeriod(long pollingPeriodMillis)
Sets the polling period in miliseconds.
|
void |
setTrustManager(ApplicationTrustManager trustManager)
Sets the trust manager to be used by this ControlPanelInfo (and in
general by the control panel).
|
void |
setUserDataConnection(ConnectionWrapper conn)
Sets the connection to be used by the ControlPanelInfo to retrieve user data.
|
void |
startPolling()
Starts polling the server configuration.
|
void |
stopPolling()
Stops polling the server.
|
boolean |
unregisterModifiedIndex(AbstractIndexDescriptor index)
Unregisters a modified index.
|
void |
unregisterModifiedIndexesInBackend(String backendName)
Unregisters all the modified indexes on a given backend.
|
public static ControlPanelInfo getInstance()
public ServerDescriptor getServerDescriptor()
public void registerTask(Task task)
task
- the task to be registered.public boolean mustReindex(AbstractIndexDescriptor index)
index
- the index.true
if the index must be reindexed, false
otherwise.public void registerModifiedIndex(AbstractIndexDescriptor index)
index
- the index.public boolean unregisterModifiedIndex(AbstractIndexDescriptor index)
index
- the index.true
if the index is found in the list of modified
indexes, false
otherwise.public void unregisterModifiedIndexesInBackend(String backendName)
backendName
- the name of the backend.public Collection<AbstractIndexDescriptor> getModifiedIndexes()
public void setConnection(ConnectionWrapper connWrapper)
connWrapper
- the connection.public ConnectionWrapper getConnection()
public void setUserDataConnection(ConnectionWrapper conn) throws org.forgerock.opendj.ldap.LdapException
conn
- the connection.org.forgerock.opendj.ldap.LdapException
- if there is a problem updating the connection pool.public ConnectionWrapper getUserDataConnection()
public void backupCreated(BackupDescriptor newBackup)
newBackup
- the new created backup.public void backendPopulated(Set<BackendDescriptor> backends)
backends
- the populated backends.public void regenerateDescriptor()
public void addConfigChangeListener(ConfigChangeListener listener)
listener
- the listener.public boolean removeConfigChangeListener(ConfigChangeListener listener)
listener
- the listener.true
if the listener is found, false
otherwise.public void addBackupCreatedListener(BackupCreatedListener listener)
listener
- the listener.public boolean removeBackupCreatedListener(BackupCreatedListener listener)
listener
- the listener.true
if the listener is found, false
otherwise.public void addBackendPopulatedListener(BackendPopulatedListener listener)
listener
- the listener.public boolean removeBackendPopulatedListener(BackendPopulatedListener listener)
listener
- the listener.true
if the listener is found, false
otherwise.public void addIndexModifiedListener(IndexModifiedListener listener)
listener
- the listener.public boolean removeIndexModifiedListener(IndexModifiedListener listener)
listener
- the listener.true
if the listener is found, false
otherwise.public void startPolling()
public void stopPolling()
public ApplicationTrustManager getTrustManager()
public void setTrustManager(ApplicationTrustManager trustManager)
trustManager
- the trust manager to be used by this ControlPanelInfo.public int getConnectTimeout()
public void setConnectTimeout(int connectTimeout)
0
to express no timeout.connectTimeout
- the timeout to establish the connection in
milliseconds.
Use 0
to express no timeout.public ConnectionProtocolPolicy getConnectionPolicy()
public void setConnectionPolicy(ConnectionProtocolPolicy connectionPolicy)
connectionPolicy
- the connection policy to be used by this
ControlPanelInfo.public HostPort getLdapsHostPort()
null
if no LDAPS HostPort was found.public HostPort getAdminConnectorHostPort()
null
if no Administration
Connector HostPort was found.public HostPort getLocalAdminConnectorHostPort()
null
if no Administration
Connector HostPort was found.public HostPort getLdapHostPort()
null
if no LDAP HostPort was found.public HostPort getStartTlsHostPort()
null
if no Start TLS HostPort is found.public boolean connectUsingStartTLS()
true
if we must connect to the server using Start TLS
and false
otherwise.public boolean connectUsingLDAPS()
true
if we must connect to the server using LDAPS, false
otherwise.public boolean mustDeregisterConfig()
true
if the configuration must be deregistered and false
otherwise.
This is required when we update the configuration, in these cases cn=config
must the deregistered and after that register again.true
if the configuration must be deregistered and false
otherwise.public void setMustDeregisterConfig(boolean mustDeregisterConfig)
mustDeregisterConfig
- whether the configuration must be deregistered
or not.public void setIsLocal(boolean isLocal)
isLocal
- whether the server is local or not.public boolean isLocal()
true
if we are trying to manage the local host,
false
otherwise.public LDAPConnectionPool getConnectionPool()
public IconPool getIconPool()
public long getPollingPeriod()
public void setPollingPeriod(long pollingPeriodMillis)
pollingPeriodMillis
- the polling time in miliseconds.public void initializeConfigurationFramework() throws ConfigException
ConfigException
- If error occurred during the initializationCopyright © 2010-2017 ForgeRock AS. All Rights Reserved.