• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java NotesThread类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中lotus.domino.NotesThread的典型用法代码示例。如果您正苦于以下问题:Java NotesThread类的具体用法?Java NotesThread怎么用?Java NotesThread使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NotesThread类属于lotus.domino包,在下文中一共展示了NotesThread类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: initNotes

import lotus.domino.NotesThread; //导入依赖的package包/类
@BeforeClass
public static void initNotes() {
	NotesNativeAPI.initialize();
	
	String notesProgramDir = System.getenv("Notes_ExecDirectory");
	String notesIniPath = System.getenv("NotesINI");
	
	if (notesProgramDir!=null && notesProgramDir.length()>0 && notesIniPath!=null && notesIniPath.length()>0) {
		NotesInitUtils.notesInitExtended(new String[] {
				notesProgramDir,
				"="+notesIniPath
		});
		m_notesInitExtendedCalled = true;
	}
	NotesThread.sinitThread();
	Native.setProtected(true);
}
 
开发者ID:klehmann,项目名称:domino-jna,代码行数:18,代码来源:BaseJNATestClass.java


示例2: testSessionClosingIt

import lotus.domino.NotesThread; //导入依赖的package包/类
@Test
public void testSessionClosingIt() {
	String password = Credentials.getPassword();
	assertFalse("Password can be an empty string", password.equals(""));

	for (int i = 0; i < 10; i++) {
		NotesThread.sinitThread();

		Session session = River.getSession(River.LOTUS_DOMINO,
				(String) null, (String) null, Credentials.getPassword());

		assertTrue("Notes Session could not be retrieved at the iteration " + i, session.isOpen());
		assertFalse("There's a problem with the Session at the iteration " + i + ". I can't retrieve the current user name.",
				session.getUserName().equals(""));

		session.close();
		
		NotesThread.stermThread();
	}
}
 
开发者ID:mariosotil,项目名称:river-framework,代码行数:21,代码来源:LotusNotesSessionTest.java


示例3: testSessionClosingFromRiverFactory

import lotus.domino.NotesThread; //导入依赖的package包/类
@Test
public void testSessionClosingFromRiverFactory() {
	String password = Credentials.getPassword();
	assertFalse("Password can be an empty string", password.equals(""));

	for (int i = 0; i < 10; i++) {
		NotesThread.sinitThread();
		
		Session session = River.getSession(River.ORG_OPENNTF_DOMINO,
				(String) null, (String) null, Credentials.getPassword());

		assertTrue("Notes Session could not be retrieved at the iteration " + i, session.isOpen());
		assertFalse("There's a problem with the Session at the iteration " + i + ". I can't retrieve the current user name.",
				session.getUserName().equals(""));

		River.closeSession(River.ORG_OPENNTF_DOMINO);
		
		NotesThread.stermThread();
	}
}
 
开发者ID:mariosotil,项目名称:river-framework,代码行数:21,代码来源:LotusNotesSessionTest.java


示例4: testSessionClosingIt

import lotus.domino.NotesThread; //导入依赖的package包/类
@Test
public void testSessionClosingIt() {
	String password = Credentials.getPassword();
	assertFalse("Password can be an empty string", password.equals(""));

	for (int i = 0; i < 10; i++) {
		NotesThread.sinitThread();

		Session session = River.getSession(River.ORG_OPENNTF_DOMINO,
				(String) null, (String) null, Credentials.getPassword());

		assertTrue("Notes Session could not be retrieved at the iteration " + i, session.isOpen());
		assertFalse("There's a problem with the Session at the iteration " + i + ". I can't retrieve the current user name.",
				session.getUserName().equals(""));

		session.close();
		
		NotesThread.stermThread();
	}
}
 
开发者ID:mariosotil,项目名称:river-framework,代码行数:21,代码来源:LotusNotesSessionTest.java


示例5: before

import lotus.domino.NotesThread; //导入依赖的package包/类
@BeforeClass
	public static void before() {
		NotesThread.sinitThread();

//		new LoggerHelper(log)
//		.setUseParentHandlers(false)
//		.clearHandlers()
//		.addConsoleHandler()
//		.addFileHandler("D:\\stress-test.txt")
//		.setLevel(Level.INFO);
		
		maxDocumentsForStressTest = 100;

		log.setUseParentHandlers(false);
		log.fine("Starting test");
	}
 
开发者ID:mariosotil,项目名称:river-framework,代码行数:17,代码来源:StressTest.java


示例6: testSessionClosingFromRiverFactory

import lotus.domino.NotesThread; //导入依赖的package包/类
@Test
public void testSessionClosingFromRiverFactory() {
	String password = Credentials.getPassword();
	assertFalse("Password can be an empty string", password.equals(""));

	for (int i = 0; i < 10; i++) {
		NotesThread.sinitThread();
		
		Session session = River.getSession(River.LOTUS_DOMINO,
				(String) null, (String) null, Credentials.getPassword());

		assertTrue("Notes Session could not be retrieved at the iteration " + i, session.isOpen());
		assertFalse("There's a problem with the Session at the iteration " + i + ". I can't retrieve the current user name.",
				session.getUserName().equals(""));

		River.closeSession(River.LOTUS_DOMINO);
		
		NotesThread.stermThread();
	}
}
 
开发者ID:mariosotil,项目名称:river-framework,代码行数:21,代码来源:LotusNotesSessionTest.java


示例7: newThread

import lotus.domino.NotesThread; //导入依赖的package包/类
@Override
public Thread newThread(Runnable runnable, ServerSession session) {
	if(ApplicationListener.log.isInfoEnabled()) {
		ApplicationListener.log.info("{0}: Spawning thread for server session {1}", GroovyShellLibrary.LIBRARY_ID, session);
	}
	NotesThread result = new NotesThread(runnable);
	//result.setContextClassLoader(classLoader);
	ClassLoader cl = new DelegatingClassLoader(ApplicationListener.class.getClassLoader());
	result.setContextClassLoader(cl);
	return result;
}
 
开发者ID:jesse-gallagher,项目名称:xsp-groovy-shell,代码行数:12,代码来源:DominoGroovyThreadFactory.java


示例8: termNotes

import lotus.domino.NotesThread; //导入依赖的package包/类
@AfterClass
public static void termNotes() {
	if (m_notesInitExtendedCalled) {
		NotesInitUtils.notesTerm();
	}
	NotesThread.stermThread();
}
 
开发者ID:klehmann,项目名称:domino-jna,代码行数:8,代码来源:BaseJNATestClass.java


示例9: initNotes

import lotus.domino.NotesThread; //导入依赖的package包/类
@BeforeClass
public static void initNotes() {
	String notesProgramDir = System.getenv("Notes_ExecDirectory");
	String notesIniPath = System.getenv("NotesINI");

	if (notesProgramDir!=null && notesProgramDir.length()>0 && notesIniPath!=null && notesIniPath.length()>0) {
		NotesInitUtils.notesInitExtended(new String[] {
				notesProgramDir,
				"="+notesIniPath
		});
		m_notesInitExtendedCalled = true;
	}
	NotesThread.sinitThread();
}
 
开发者ID:klehmann,项目名称:domino-jna,代码行数:15,代码来源:BaseJNATestClass.java


示例10: openTrusted

import lotus.domino.NotesThread; //导入依赖的package包/类
public static Session openTrusted(){
	Session s = null;
	try {
		NotesThread.sinitThread();
		s = NotesFactory.createTrustedSession();
		logger.log(Level.FINE,"opened trusted session for " + s.getEffectiveUserName());
	} catch (NotesException e) {
		logger.log(Level.SEVERE,null,e);
	}
	return s;
}
 
开发者ID:mwambler,项目名称:xockets.io,代码行数:12,代码来源:SessionFactory.java


示例11: openSession

import lotus.domino.NotesThread; //导入依赖的package包/类
public static Session openSession(String username, String password){
	Session s = null;
	try {
		NotesThread.sinitThread();
		s = NotesFactory.createSession((String) null, username, password);
		logger.log(Level.FINE,"opened session for " + s.getUserName());
	} catch (NotesException e) {
		logger.log(Level.SEVERE,null,e);
	}
	return s;
}
 
开发者ID:mwambler,项目名称:xockets.io,代码行数:12,代码来源:SessionFactory.java


示例12: createTrustedSession

import lotus.domino.NotesThread; //导入依赖的package包/类
public static Session createTrustedSession(){
	NotesThread.sinitThread();
	Session s=null;
	try {
		s = NotesFactory.createTrustedSession();
	} catch (NotesException e) {
		logger.log(Level.SEVERE,null, e);
	}
	return s;
}
 
开发者ID:mwambler,项目名称:xockets.io,代码行数:11,代码来源:XSPUtils.java


示例13: before

import lotus.domino.NotesThread; //导入依赖的package包/类
@BeforeClass
public static void before() {
	NotesThread.sinitThread();

	testDepth = 2;

	new LoggerHelper(log).clearHandlers().addConsoleHandler().setLevel(Level.OFF);

	log.setUseParentHandlers(false);
	log.fine("Starting test");
}
 
开发者ID:mariosotil,项目名称:river-framework,代码行数:12,代码来源:StressTest.java


示例14: main

import lotus.domino.NotesThread; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static void main(String[] args) {
	NotesThread.sinitThread();

	Session<org.openntf.domino.Base<?>> session = (Session<org.openntf.domino.Base<?>>) River.getSession(River.ORG_OPENNTF_DOMINO,
			(String) null, (String) null, Credentials.getPassword()).getWrapperObject();
	
	Database<org.openntf.domino.Database> database = (Database<org.openntf.domino.Database>) session.getDatabase("", "massive.nsf");

	DocumentIterator<org.openntf.domino.Base<?>,org.openntf.domino.Document> it = (DocumentIterator<Base<?>, org.openntf.domino.Document>) database.getAllDocuments();
	int i = 0;
	
	while(it.hasNext()) {
		Document<org.openntf.domino.Document> doc = it.next();
		String counter = doc.getFieldAsString("counter");
		if (++i % 250 == 0) {
			System.out.println("=" + counter);
		}
		
		if (i > 5000) break;
	}
	
	System.out.println("Done");

	River.closeSession(River.ORG_OPENNTF_DOMINO);
	
	NotesThread.stermThread();
}
 
开发者ID:mariosotil,项目名称:river-framework,代码行数:29,代码来源:FactoryTest.java


示例15: before

import lotus.domino.NotesThread; //导入依赖的package包/类
@BeforeClass
	public static void before() {
		NotesThread.sinitThread();
				
//		River.setLevel(River.LOG_CORE, Level.FINE);
//		River.setLevel(River.LOG_WRAPPER, Level.SEVERE);
		
//		River.LOG_CORE.fine("Starting test");
	}
 
开发者ID:mariosotil,项目名称:river-framework,代码行数:10,代码来源:DatabaseTest.java


示例16: before

import lotus.domino.NotesThread; //导入依赖的package包/类
@BeforeClass
public static void before() {
	NotesThread.sinitThread();

	testDepth = 3;

	new LoggerHelper(log).clearHandlers().addConsoleHandler().setLevel(Level.OFF);

	log.setUseParentHandlers(false);
	log.fine("Starting test");
}
 
开发者ID:mariosotil,项目名称:river-framework,代码行数:12,代码来源:StressTest.java


示例17: main

import lotus.domino.NotesThread; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public static void main(String[] args) {
	NotesThread.sinitThread();

	Session<lotus.domino.Base> session = (Session<lotus.domino.Base>) River.getSession(River.LOTUS_DOMINO,
			(String) null, (String) null, Credentials.getPassword()).getWrapperObject();
	Database<lotus.domino.Base> database = (Database<Base>) session.getDatabase("", "massive.nsf");

	DocumentIterator<lotus.domino.Base, lotus.domino.Document> it = (DocumentIterator<Base, lotus.domino.Document>) database.getAllDocuments();
	int i = 0;
	
	while(it.hasNext()) {
		Document<lotus.domino.Document> doc = it.next();
		String counter = doc.getFieldAsString("counter");
		if (++i % 250 == 0) {
			System.out.println("=" + counter);
		}
		
		if (i > 5000) break;
	}
	
	System.out.println("Done");

	River.closeSession(River.LOTUS_DOMINO);
	
	NotesThread.stermThread();
}
 
开发者ID:mariosotil,项目名称:river-framework,代码行数:28,代码来源:FactoryTest.java


示例18: before

import lotus.domino.NotesThread; //导入依赖的package包/类
@BeforeClass
public static void before() {
	NotesThread.sinitThread();

	LoggerHelper lh = new LoggerHelper(log);
	lh.clearHandlers().addConsoleHandler().setLevel(Level.OFF);

	log.setUseParentHandlers(false);
	log.fine("Starting test");
}
 
开发者ID:mariosotil,项目名称:river-framework,代码行数:11,代码来源:StressTest.java


示例19: closeSession

import lotus.domino.NotesThread; //导入依赖的package包/类
public static void closeSession(Session session){
	logger.log(Level.FINE,"closing session");
	Recycler.recycle(session);
	NotesThread.stermThread();
}
 
开发者ID:mwambler,项目名称:xockets.io,代码行数:6,代码来源:SessionFactory.java


示例20: before

import lotus.domino.NotesThread; //导入依赖的package包/类
@BeforeClass
public static void before() {
	NotesThread.sinitThread();
}
 
开发者ID:mariosotil,项目名称:river-framework,代码行数:5,代码来源:DocumentIteratorTest.java



注:本文中的lotus.domino.NotesThread类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java GetDelegationTokenRequestProtoOrBuilder类代码示例发布时间:2022-05-22
下一篇:
Java Shader类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap