public abstract class AbstractServiceImpl<S extends Session,SI extends AbstractSessionImpl> extends ServiceCommon<S,SI>
| Modifier and Type | Field and Description |
|---|---|
protected AuthorizationProvider<AbstractSessionImpl> |
authorizationProvider |
protected Set<SI> |
sessions |
DEFAULT_RESULT| Constructor and Description |
|---|
AbstractServiceImpl(BundleContext context,
Executor executor) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeSession(S session)
Close the provided session
Closing the session includes: unregistering from all items, canceling all
running operations
|
protected S |
createSession(Future<UserInformation> loginFuture,
Properties properties,
CallbackHandler callbackHandler) |
NotifyFuture<S> |
createSession(Properties properties,
CallbackHandler callbackHandler)
Create a new session for further accessing the hive
|
protected abstract SI |
createSessionInstance(UserInformation user,
Map<String,String> sessionProperties) |
protected void |
handleSessionClosed(SI session) |
protected void |
handleSessionCreated(SI session) |
void |
start() |
void |
stop() |
protected SI |
validateSession(S session,
Class<SI> sessionImplClazz) |
authorize, authorize, extractPrivileges, fillSessionProperties, loginUser, makeEffectiveUserInformation, setAuditLogService, setAuthenticationImplementation, setAuthorizationImplementationprotected final Set<SI extends AbstractSessionImpl> sessions
protected final AuthorizationProvider<AbstractSessionImpl> authorizationProvider
public AbstractServiceImpl(BundleContext context, Executor executor) throws InvalidSyntaxException
InvalidSyntaxExceptionpublic void closeSession(S session) throws InvalidSessionException
Servicesession - the session to closeInvalidSessionException - In the case the session is not a valid sessionprotected void handleSessionClosed(SI session)
public NotifyFuture<S> createSession(Properties properties, CallbackHandler callbackHandler)
Serviceproperties - properties used to create the sessionprotected S createSession(Future<UserInformation> loginFuture, Properties properties, CallbackHandler callbackHandler) throws Exception
Exceptionprotected void handleSessionCreated(SI session)
protected abstract SI createSessionInstance(UserInformation user, Map<String,String> sessionProperties)
protected SI validateSession(S session, Class<SI> sessionImplClazz) throws InvalidSessionException
InvalidSessionException