public final class SessionFactoryFinder extends Object
SessionFactory implementation and creates a factory object.
Sample code:
SessionFactory factory = SessionFactoryFinder.find(); Map<String, String> parameter = new HashMap<String, String>(); parameter.put(SessionParameter.USER, "Otto"); parameter.put(SessionParameter.PASSWORD, "****"); parameter.put(SessionParameter.ATOMPUB_URL, "http://localhost/cmis/atom"); parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value()); parameter.put(SessionParameter.REPOSITORY_ID, "myRepository"); ... Session session = factory.createSession(parameter);
SessionFactory| Modifier and Type | Method and Description |
|---|---|
static SessionFactory |
find()
Creates a default
SessionFactory object. |
static SessionFactory |
find(String factoryId)
Creates a
SessionFactory object. |
static SessionFactory |
find(String factoryId,
ClassLoader classLoader)
Creates a
SessionFactory object. |
public static SessionFactory find() throws ClassNotFoundException, InstantiationException
SessionFactory object.SessionFactory objectClassNotFoundException - if the session factory class cannot be foundInstantiationException - if the session factory object cannot be instantiatedpublic static SessionFactory find(String factoryId) throws ClassNotFoundException, InstantiationException
SessionFactory object.factoryId - the factory ID of the SessionFactorySessionFactory objectClassNotFoundException - if the session factory class cannot be foundInstantiationException - if the session factory object cannot be instantiatedpublic static SessionFactory find(String factoryId, ClassLoader classLoader) throws ClassNotFoundException, InstantiationException
SessionFactory object.factoryId - the factory ID of the SessionFactoryclassLoader - the class loader to useSessionFactory objectClassNotFoundException - if the session factory class cannot be foundInstantiationException - if the session factory object cannot be instantiatedCopyright © 2009–2017 The Apache Software Foundation. All rights reserved.