|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectissrg.pba.management.manager.PManagement
public abstract class PManagement
PERMIS Management Model.
This model implements "MVC", and it runs a work thread which it uses to run tasks that may not complete quickly, this also allows the calling threads to carry on with there own tasks. The tasks are placed on the queue using the invokeLater method, and by convention any method that places the task on the queue does so by placing the implementation in another private method of the same name with the suffix "Impl".
Nested Class Summary | |
---|---|
class |
PManagement.PMAgentReference
PERMIS agemt reference. |
Constructor Summary | |
---|---|
PManagement(PMConfiguration configurationParam,
java.util.Map<java.lang.String,java.lang.String> arguments)
PERMIS Management constructor. |
Method Summary | |
---|---|
PManagement.PMAgentReference |
addPMAgentReference()
create a new agent reference. |
java.lang.String |
getIdentityStoreProvider()
get the identity key store provider. |
java.lang.String |
getIdentityStoreService()
get the identity key store service. |
PManagement.PMAgentReference[] |
getPMAgentReferenceArray()
Get a list of agent references. |
protected PMConfiguration |
getPMConfiguration()
return the configuration object. |
java.lang.String |
getSSLKeyManagerFactoryProvider()
get the key manager factory provider. |
java.lang.String |
getSSLKeyManagerFactoryService()
get the key manager factory service type. |
java.lang.String |
getSSLTrustManagerFactoryProvider()
get the trust manager factory provider. |
java.lang.String |
getSSLTrustManagerFactoryService()
get the trust manager factory service type. |
PMException |
getTrustException()
get the exception generated in openTrustStore. |
java.lang.String |
getTrustStoreProvider()
get the trust key store provider. |
java.lang.String |
getTrustStoreService()
get the trust key store service (type). |
protected void |
informAll(PManagement.PMAgentReference agentReference)
call informAllImpl in the work thread. |
void |
invokeLater(java.lang.Runnable runnable)
hand over to the PERMIS-management work thread. |
boolean |
isConfigurationChanged()
Change in configuration from the source. |
boolean |
isStopping()
True when the application is closing down. |
boolean |
isTrusted()
Returns true if the correct key and trust stores have been opened successfully. |
void |
openTrustStore(char[] passwordIdentityArrayParam,
char[] passwordTrustArrayParam)
Get the trust and identity information. |
void |
register(PManagementListener listener)
register the listener to receive notification. |
void |
removePMAgentReference(PManagement.PMAgentReference agentReference)
remove an agent reference. |
void |
run()
The life cycle of the PERMIS management exists in this run method. |
void |
setIdentityStoreProvider(java.lang.String value)
set the identity key store provider. |
void |
setIdentityStoreService(java.lang.String value)
set the identity key store service (type). |
void |
setSSLKeyManagerFactoryProvider(java.lang.String value)
set the key manager factory provider. |
void |
setSSLKeyManagerFactoryService(java.lang.String value)
set the key manager factory service type. |
void |
setSSLTrustManagerFactoryProvider(java.lang.String value)
set the trust manager factory provider. |
void |
setSSLTrustManagerFactoryService(java.lang.String value)
set the trust manager factory service type. |
void |
setTrustStoreProvider(java.lang.String value)
set the trust key store provider. |
void |
setTrustStoreService(java.lang.String value)
set the trust key store service (type). |
int |
sizePMAgentReferenceList()
the number of agent references. |
void |
stop()
This method will stop the running loop, inside the run method. |
void |
stopping()
stopping allows for a controlled shut down. |
void |
storeConfiguration()
write out the PERMIS management permanent configuration. |
protected java.lang.String |
trimString(java.lang.String stringParam)
all the configuration parameters can be null, but if they are not then leading and trailing spaces need to be removed. |
void |
unregister(PManagementListener listener)
remove the listener from the list, that recieves notification. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PManagement(PMConfiguration configurationParam, java.util.Map<java.lang.String,java.lang.String> arguments) throws PMException
configurationParam
- -
PERMIS agent configuration used to
set up the MBean server and connector-server
it must NOT be nullarguments
- -
command line arguments
PMException
- -
if anything goes wrong with loading in the
Permanent configuration.Method Detail |
---|
protected PMConfiguration getPMConfiguration()
public void run()
there is a lot of swapping between the PERMIS management work thread and the application that creates an instance of this PManagement model.
run
in interface java.lang.Runnable
public void stopping()
public boolean isStopping()
this method can be use as a global "is the application still running flag" for example in loops.
public void stop()
It must follow a call to stopping, so if a call to stopping has not happened this method will call before the stop running is done.
public void invokeLater(java.lang.Runnable runnable)
normally called by the event-dispatching thread when it want's to pass something of to the PERMIS-management thread
runnable
- the object that implements "Runnable" and is placed on the
queue to be executed.public void register(PManagementListener listener)
listener
- to be placed into the listpublic void unregister(PManagementListener listener)
listener
- the listener to remove form the list.protected void informAll(PManagement.PMAgentReference agentReference)
agentReference
- the inner PERMIS agent where the change happen, or nullpublic boolean isTrusted()
public void openTrustStore(char[] passwordIdentityArrayParam, char[] passwordTrustArrayParam)
passwordIdentityArrayParam
- password for the identity key store.passwordTrustArrayParam
- password for the trust key store.public PMException getTrustException()
public java.lang.String getIdentityStoreService()
protected java.lang.String trimString(java.lang.String stringParam)
stringParam
- with leading and or trailing spaces
public void setIdentityStoreService(java.lang.String value)
value
- the identity key store service identifierpublic java.lang.String getIdentityStoreProvider()
public void setIdentityStoreProvider(java.lang.String value)
value
- the identity key store provider identifierpublic java.lang.String getTrustStoreService()
public void setTrustStoreService(java.lang.String value)
value
- the trust key store service identifierpublic java.lang.String getTrustStoreProvider()
public void setTrustStoreProvider(java.lang.String value)
value
- the trust key store providerpublic java.lang.String getSSLKeyManagerFactoryService()
public void setSSLKeyManagerFactoryService(java.lang.String value)
value
- the key manager factory service identifierpublic java.lang.String getSSLKeyManagerFactoryProvider()
public void setSSLKeyManagerFactoryProvider(java.lang.String value)
value
- the key manager factory provider identifierpublic java.lang.String getSSLTrustManagerFactoryService()
public void setSSLTrustManagerFactoryService(java.lang.String value)
value
- the trust manager factory service identifierpublic java.lang.String getSSLTrustManagerFactoryProvider()
public void setSSLTrustManagerFactoryProvider(java.lang.String value)
value
- the trust manager factory provider identifierpublic boolean isConfigurationChanged()
Returns true if the configuration has been altered and needs writing out to permanent storage (the configuration file).
public void storeConfiguration() throws PMException
PMException
- if the permanent configuration
failed to be stored to it's
permanent locationpublic PManagement.PMAgentReference addPMAgentReference()
public void removePMAgentReference(PManagement.PMAgentReference agentReference)
agentReference
- agent reference to removepublic PManagement.PMAgentReference[] getPMAgentReferenceArray()
public int sizePMAgentReferenceList()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |