|
Cumulus4j API (1.1.1) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cumulus4j.keymanager.channel.KeyManagerChannelManager
public class KeyManagerChannelManager
Manager for the communication channel between key manager and application server.
The so-called "key manager channel" is - as shown in the document
Deployment scenarios - an
HTTP(S) connection from the key-manager to the application server with an inverse request-response-cycle.
This means, the application server sends a Request
,
the key manager handles it and then sends a Response
back.
Constructor Summary | |
---|---|
KeyManagerChannelManager(SessionManager sessionManager,
String appServerBaseURL)
Instantiate a KeyManagerChannelManager . |
Method Summary | ||
---|---|---|
String |
getAppServerBaseURL()
Get the base-URL before the "/KeyManagerChannel" - e.g. |
|
int |
getDesiredThreadCount()
Get the quantity of KeyManagerChannelListenerThread s that should be running for this
KeyManagerChannelManager . |
|
String |
getKeyManagerChannelURL()
Get the complete URL to the KeyManagerChannel . |
|
protected
|
getRequestHandler(R request)
Get the appropriate handler for the given request . |
|
SessionManager |
getSessionManager()
Get the SessionManager that was passed in the constructor. |
|
void |
setDesiredThreadCount(int desiredThreadCount)
Set the quantity of KeyManagerChannelListenerThread s that should be running for this
KeyManagerChannelManager . |
|
protected boolean |
unregisterThreadIfMoreThanDesiredThreadCount(KeyManagerChannelListenerThread thread)
Unregister the given thread , if there are currently more threads running than desired. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeyManagerChannelManager(SessionManager sessionManager, String appServerBaseURL)
KeyManagerChannelManager
.
sessionManager
- the SessionManager
whichappServerBaseURL
- the base-URL before the "/KeyManagerChannel" - e.g. if the REST URL of the KeyManagerChannel-service is
"https://serverUsingCumulus4j.mydomain.org/org.cumulus4j.keymanager.back.webapp/KeyManagerChannel", then this must be
"https://serverUsingCumulus4j.mydomain.org/org.cumulus4j.keymanager.back.webapp".Method Detail |
---|
public SessionManager getSessionManager()
SessionManager
that was passed in the constructor.
SessionManager
.public String getAppServerBaseURL()
public String getKeyManagerChannelURL()
KeyManagerChannel
.
KeyManagerChannel
.public void setDesiredThreadCount(int desiredThreadCount)
Set the quantity of KeyManagerChannelListenerThread
s that should be running for this
KeyManagerChannelManager
.
If the given desiredThreadCount
is greater than
the number of currently running threads, new threads are created. If the desiredThreadCount
is less than the number of currently running threads, some of the threads will terminate themselves
until the number of currently running threads matches the desired quantity.
desiredThreadCount
- the new quantity of KeyManagerChannelListenerThread
s which should be
active for this KeyManagerChannelManager
.getDesiredThreadCount()
public int getDesiredThreadCount()
KeyManagerChannelListenerThread
s that should be running for this
KeyManagerChannelManager
.
KeyManagerChannelListenerThread
s that should be active for this
KeyManagerChannelManager
.setDesiredThreadCount(int)
protected boolean unregisterThreadIfMoreThanDesiredThreadCount(KeyManagerChannelListenerThread thread)
Unregister the given thread
, if there are currently more threads running than desired.
This method is called by a KeyManagerChannelListenerThread
in its run-loop to determine, if the thread
should terminate itself (see setDesiredThreadCount(int)
). If the method returns true
,
the thread will exit its run()
method.
thread
- the thread.
true
if the thread was unregistered and thus must exit its run()
method;
false
if the thread was not unregistered and should thus continue.protected <R extends Request> RequestHandler<R> getRequestHandler(R request) throws InstantiationException, IllegalAccessException
handler
for the given request
.
R
- the type of the request
.request
- the request.
RequestHandler
for the request.
InstantiationException
- if Class.newInstance()
failed to create the handler instance.
IllegalAccessException
- if Class.newInstance()
failed to create the handler instance.
|
Cumulus4j API (1.1.1) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |