@ConfigurationDescription(properties={@Property(name="ServiceAuthUserName",type=STRING,defaultValue="${arflow:confVar.SystemUserName}"),,}) public abstract class AuthenticatedInjectedService extends InitialisedInjectedService
AbstractAuthenticatedService. Like
InitialisedInjectedService this injected service will not be of much
use before initialised by
the platform. For instance, there will be no session factory, so no creation
and no verification of session tokens can take place. Check with
InitialisedInjectedService.isInitialised() whether the injected service is usable. Methods that
usually wait for this service to be started, will not block but throw an
exception before the initialisation. This is similar to their behaviour after
the service has been shut down.adept2Service, loggerClass, NOT_INITIALISED_EXCEPTIONEMPTY_STRING_ARRAY, logger, runtimeRequiredServices, startupRequiredServices| Constructor and Description |
|---|
AuthenticatedInjectedService(java.util.logging.Logger logger)
Creates an injected service that can be initialised by the platform and
provides a session factory.
|
AuthenticatedInjectedService(java.util.logging.Logger logger,
java.lang.String[] startupRequiredServices,
java.lang.String[] runtimeRequiredServices,
java.lang.Class<?> cls)
Creates an injected service that can be initialised by the platform and
provides a session factory.
|
| Modifier and Type | Method and Description |
|---|---|
protected SessionToken |
createChildSession(SessionToken parentSession) |
protected SessionToken |
createSession() |
protected QualifiedAgent |
getAgent(SessionToken session) |
SerialisableTriple<java.lang.String,java.lang.String,java.lang.String> |
getServiceInstanceName()
Gets the (optional) cluster name, the unique node name and the hierarchical instance name of
this service.
|
protected SessionFactory |
getSessionFactory() |
protected QualifiedAgent |
getTopLevelAgent(SessionToken session) |
protected Pair<QualifiedAgent,QualifiedAgent> |
getUserCredentials(SessionToken session) |
void |
initPlatform(Configuration conf,
Registry registry)
Creates a wrapped
AbstractAuthenticatedService. |
protected boolean |
sessionHasCapability(SessionToken session,
java.lang.String capability) |
_sessionActive, _sessionFinished, changeLogContext, changeLogContext, changeLogContext, csvLoggingEnabled, getClassSpecificJulLogger, getLogger, getRelease, init, isActive, isInitialised, logMethodEntry, logMethodEntry, logMethodEntry, logMethodExit, logMethodExit, privilegeThread, revertLogContextChanges, sessionActive, sessionActive, sessionActive, sessionFinished, shutdown, signalShutdown, signalStart, start, unprivilegeThreadgetLocalUris, getRuntimeRequiredServices, getStartupRequiredServices, getURIs, ping, preShutdownpublic AuthenticatedInjectedService(java.util.logging.Logger logger)
logger - The logger which to use for this service. This will only be
used until initialisation by the platform. Afterwards the logger of the
AbstractADEPT2Service will be used.public AuthenticatedInjectedService(java.util.logging.Logger logger,
java.lang.String[] startupRequiredServices,
java.lang.String[] runtimeRequiredServices,
java.lang.Class<?> cls)
logger - The logger which to use for this service. This will only be
used until initialisation by the platform. Afterwards the logger of the
AbstractADEPT2Service will be used.startupRequiredServices - The service type names of services required
at startup time (in InitialisedInjectedService.init(URI[], URI[]) and InitialisedInjectedService.start()).runtimeRequiredServices - The service type names of services required
at runtime (after startup time).cls - The class which to use for the logger provided by
AbstractADEPT2Service, this is usually the interface
of the service.public void initPlatform(Configuration conf, Registry registry) throws AbortServiceException
AbstractAuthenticatedService.initPlatform in class InitialisedInjectedServiceconf - The configuration provided by the platform.registry - The registry allowing to access the platform.AbortServiceException - If there are problems initialising this
service, an AbortServiceException will be thrown.public SerialisableTriple<java.lang.String,java.lang.String,java.lang.String> getServiceInstanceName()
ADEPT2ServicegetServiceInstanceName in interface ADEPT2ServicegetServiceInstanceName in class InjectedADEPT2Serviceprotected SessionFactory getSessionFactory()
InvalidServiceStateException - If this service has not been
initialised by the platform yet, an
InvalidServiceStateException will be thrown.AbstractAuthenticatedService.getSessionFactory()protected SessionToken createSession()
InvalidServiceStateException - If this service has not been
initialised by the platform yet, an
InvalidServiceStateException will be thrown.AbstractAuthenticatedService.createSession()protected SessionToken createChildSession(SessionToken parentSession)
InvalidServiceStateException - If this service has not been
initialised by the platform yet, an
InvalidServiceStateException will be thrown.AbstractAuthenticatedService.createChildSession(SessionToken)protected boolean sessionHasCapability(SessionToken session, java.lang.String capability)
InvalidServiceStateException - If this service has not been
initialised by the platform yet, an
InvalidServiceStateException will be thrown.AbstractAuthenticatedService.sessionHasCapability(SessionToken, String)protected Pair<QualifiedAgent,QualifiedAgent> getUserCredentials(SessionToken session)
InvalidServiceStateException - If this service has not been
initialised by the platform yet, an
InvalidServiceStateException will be thrown.AbstractAuthenticatedService.getUserCredentials(SessionToken)protected QualifiedAgent getTopLevelAgent(SessionToken session)
InvalidServiceStateException - If this service has not been initialised by the platform
yet, an InvalidServiceStateException will be thrown.AbstractAuthenticatedService.getTopLevelAgent(SessionToken)protected QualifiedAgent getAgent(SessionToken session)
InvalidServiceStateException - If this service has not been initialised by the platform
yet, an InvalidServiceStateException will be thrown.AbstractAuthenticatedService.getAgent(SessionToken)