Java 类org.jivesoftware.smack.roster.rosterstore.DirectoryRosterStore 实例源码

项目:Smack    文件:RosterVersioningTest.java   
@Before
public void setUp() throws Exception {
    DirectoryRosterStore store = DirectoryRosterStore.init(tmpFolder.newFolder("store"));
    populateStore(store);

    Builder<?, ?> builder = DummyConnection.getDummyConfigurationBuilder();
    connection = new DummyConnection(builder.build());
    connection.connect();
    connection.login();
    rosterListener = new TestRosterListener();
    roster = Roster.getInstanceFor(connection);
    roster.setRosterStore(store);
    roster.addRosterListener(rosterListener);
    roster.reload();
}