org.hibersap.session
Class SessionManagerImpl

java.lang.Object
  extended by org.hibersap.session.SessionManagerImpl
All Implemented Interfaces:
Serializable, SessionManager, SessionManagerImplementor

public final class SessionManagerImpl
extends Object
implements SessionManager, SessionManagerImplementor

Implementation of the SessionManager. A client uses the SessionManager to create Hibernate Sessions.

Author:
Carsten Erker
See Also:
Serialized Form

Constructor Summary
SessionManagerImpl(ConfigurationData data, Context context)
           
 
Method Summary
 void close()
          Closes a SessionManager, freeing resources held by the framework.
 Set<BapiInterceptor> getBapiInterceptors()
          Returns this SessionManager's Bapi interceptors
 Map<Class<?>,BapiMapping> getBapiMappings()
          Returns this SessionManager's BapiMappings.
 SessionManagerConfig getConfig()
          Get Configuration.
 Context getContext()
          Returns this SessionManager's Context class.
 ConverterCache getConverterCache()
          Returns this SessionManager's Converter cache.
 Set<ExecutionInterceptor> getExecutionInterceptors()
          Returns this SessionManager's Execution interceptors
 boolean isClosed()
          Returns the status of this SessionManager.
 Session openSession()
          Open a Session using a newly created connection to SAP.
 Session openSession(Credentials credentials)
          Open a Session using a newly created connection to SAP, providing user credentials.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SessionManagerImpl

public SessionManagerImpl(ConfigurationData data,
                          Context context)
Method Detail

close

public void close()
Description copied from interface: SessionManager
Closes a SessionManager, freeing resources held by the framework. After calling this method, the SessionManager should not be used anymore and will throw Exceptions on certain method calls.

Specified by:
close in interface SessionManager

isClosed

public boolean isClosed()
Description copied from interface: SessionManager
Returns the status of this SessionManager.

Specified by:
isClosed in interface SessionManager
Returns:
true, if this SessionManager is closed, false if it can still be used.

getBapiMappings

public Map<Class<?>,BapiMapping> getBapiMappings()
Description copied from interface: SessionManagerImplementor
Returns this SessionManager's BapiMappings.

Specified by:
getBapiMappings in interface SessionManagerImplementor
Returns:
A Map with the Class as key and the corresponding BapiMapping object as value.

getConverterCache

public ConverterCache getConverterCache()
Description copied from interface: SessionManagerImplementor
Returns this SessionManager's Converter cache.

Specified by:
getConverterCache in interface SessionManagerImplementor
Returns:
The ConverterCache instance.

getConfig

public SessionManagerConfig getConfig()
Description copied from interface: SessionManager
Get Configuration.

Specified by:
getConfig in interface SessionManager
Specified by:
getConfig in interface SessionManagerImplementor
Returns:
The Configuration object

getContext

public Context getContext()
Description copied from interface: SessionManagerImplementor
Returns this SessionManager's Context class.

Specified by:
getContext in interface SessionManagerImplementor
Returns:
The Context instance.

openSession

public Session openSession()
Description copied from interface: SessionManager
Open a Session using a newly created connection to SAP.

Specified by:
openSession in interface SessionManager
Returns:
The Session

openSession

public Session openSession(Credentials credentials)
Description copied from interface: SessionManager
Open a Session using a newly created connection to SAP, providing user credentials.

Specified by:
openSession in interface SessionManager
Parameters:
credentials - User Credentials for the SAP system to be called.
Returns:
The Session

getExecutionInterceptors

public Set<ExecutionInterceptor> getExecutionInterceptors()
Description copied from interface: SessionManagerImplementor
Returns this SessionManager's Execution interceptors

Specified by:
getExecutionInterceptors in interface SessionManagerImplementor
Returns:
A Set with the ExecutionInterceptor instances.

getBapiInterceptors

public Set<BapiInterceptor> getBapiInterceptors()
Description copied from interface: SessionManagerImplementor
Returns this SessionManager's Bapi interceptors

Specified by:
getBapiInterceptors in interface SessionManagerImplementor
Returns:
A Set with the BapiInterceptor instances.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012 akquinet tech@spree GmbH. All Rights Reserved.