@Test public void createProvider() throws Exception { File path = folder.newFolder("session"); Assume.assumeTrue(path.delete()); Properties p = new Properties(); p.setProperty(SessionProfile.KEY_PROVIDER, FileSessionProvider.class.getName()); p.setProperty(SessionProfile.KEY_PREFIX + FileSessionProvider.KEY_DIRECTORY, path.getPath()); SessionProfile profile = SessionProfile.loadFrom(p, ProfileContext.system(getClass().getClassLoader())); SessionProvider provider = profile.createProvider(); try (SessionMirror session = provider.create("hello")) { } assertThat(path.isDirectory(), is(true)); }
@Deprecated public static SessionProfile loadFrom(Properties properties, ClassLoader loader) { if (properties == null) { throw new IllegalArgumentException("properties must not be null"); } if (loader == null) { throw new IllegalArgumentException("loader must not be null"); } return loadFrom(properties, ProfileContext.system(loader)); }
SessionProfile extends BaseProfile<SessionProfile, SessionProvider> { @Deprecated public static SessionProfile loadFrom(Properties properties, ClassLoader loader) { if (properties == null) { throw new IllegalArgumentException("properties must not be null"); } if (loader == null) { throw new IllegalArgumentException("loader must not be null"); } return loadFrom(properties, ProfileContext.system(loader)); } }
SessionProfile extends BaseProfile<SessionProfile, SessionProvider> { @Deprecated public static SessionProfile loadFrom(Properties properties, ClassLoader loader) { if (properties == null) { throw new IllegalArgumentException("properties must not be null"); } if (loader == null) { throw new IllegalArgumentException("loader must not be null"); } return loadFrom(properties, ProfileContext.system(loader)); } SessionProfile(
            Class<? extends SessionProvider> providerClass,
            ProfileContext context,
            Map<String, String> configuration); }
SessionProfile extends BaseProfile<SessionProfile, SessionProvider> { @Deprecated public static SessionProfile loadFrom(Properties properties, ClassLoader loader) { if (properties == null) { throw new IllegalArgumentException("properties must not be null"); } if (loader == null) { throw new IllegalArgumentException("loader must not be null"); } return loadFrom(properties, ProfileContext.system(loader)); } SessionProfile(
            Class<? extends SessionProvider> providerClass,
            ProfileContext context,
            Map<String, String> configuration); @Override Class<? extends SessionProvider> getProviderClass(); @Override ProfileContext getContext(); Map<String, String> getConfiguration(); @Deprecated static SessionProfile loadFrom(Properties properties, ClassLoader loader); static SessionProfile loadFrom(Properties properties, ProfileContext context); void storeTo(Properties properties); static void removeCorrespondingKeys(Properties properties); }
SessionProfile extends BaseProfile<SessionProfile, SessionProvider> { @Deprecated public static SessionProfile loadFrom(Properties properties, ClassLoader loader) { if (properties == null) { throw new IllegalArgumentException("properties must not be null"); } if (loader == null) { throw new IllegalArgumentException("loader must not be null"); } return loadFrom(properties, ProfileContext.system(loader)); } SessionProfile(
            Class<? extends SessionProvider> providerClass,
            ProfileContext context,
            Map<String, String> configuration); @Override Class<? extends SessionProvider> getProviderClass(); @Override ProfileContext getContext(); Map<String, String> getConfiguration(); @Deprecated static SessionProfile loadFrom(Properties properties, ClassLoader loader); static SessionProfile loadFrom(Properties properties, ProfileContext context); void storeTo(Properties properties); static void removeCorrespondingKeys(Properties properties); static final String KEY_PROVIDER; static final String KEY_PREFIX; }