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 java.util.Set<SI> |
sessions |
DEFAULT_RESULT| Constructor and Description |
|---|
AbstractServiceImpl(BundleContext context,
java.util.concurrent.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(java.util.concurrent.Future<UserInformation> loginFuture,
java.util.Properties properties,
CallbackHandler callbackHandler) |
|
createSession(java.util.Properties properties,
CallbackHandler callbackHandler)
Create a new session for further accessing the hive
|
protected abstract SI |
createSessionInstance(UserInformation user,
java.util.Map<java.lang.String,java.lang.String> sessionProperties) |
protected void |
handleSessionClosed(SI session) |
protected void |
handleSessionCreated(SI session) |
void |
start() |
void |
stop() |
protected SI |
validateSession(S session,
java.lang.Class<SI> sessionImplClazz) |
authorize, authorize, extractPrivileges, fillSessionProperties, loginUser, makeEffectiveUserInformation, setAuditLogService, setAuthenticationImplementation, setAuthorizationImplementationprotected final java.util.Set<SI extends AbstractSessionImpl> sessions
protected final AuthorizationProvider<AbstractSessionImpl> authorizationProvider
public AbstractServiceImpl(BundleContext context,
java.util.concurrent.Executor executor)
throws InvalidSyntaxException
InvalidSyntaxExceptionpublic void start()
throws java.lang.Exception
java.lang.Exceptionpublic void stop()
throws java.lang.Exception
java.lang.Exceptionpublic 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)
publiccreateSession(java.util.Properties properties, CallbackHandler callbackHandler)
Serviceproperties - properties used to create the sessionprotected S createSession(java.util.concurrent.Future<UserInformation> loginFuture, java.util.Properties properties, CallbackHandler callbackHandler) throws java.lang.Exception
java.lang.Exceptionprotected void handleSessionCreated(SI session)
protected abstract SI createSessionInstance(UserInformation user, java.util.Map<java.lang.String,java.lang.String> sessionProperties)
Copyright (c) IBH SYSTEMS GmbH and others 2010, 2013.
All rights reserved. This program and the accompanying materials
are made available under the terms of the
Eclipse Public License v1.0