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,
Map<String,Object> contextInformation,
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, setAuthorizationImplementation
protected final Set<SI extends AbstractSessionImpl> sessions
protected final AuthorizationProvider<AbstractSessionImpl> authorizationProvider
public AbstractServiceImpl(BundleContext context, Executor executor) throws InvalidSyntaxException
InvalidSyntaxException
public void closeSession(S session) throws InvalidSessionException
Service
session
- the session to closeInvalidSessionException
- In the case the session is not a valid sessionprotected void handleSessionClosed(SI session)
public NotifyFuture<S> createSession(Properties properties, Map<String,Object> contextInformation, CallbackHandler callbackHandler)
Service
properties
- properties used to create the sessioncontextInformation
- additional context informationprotected S createSession(Future<UserInformation> loginFuture, Properties properties, CallbackHandler callbackHandler) throws Exception
Exception
protected 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