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

Java HandlerChain类代码示例

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

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



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

示例1: initHandlerChain

import javax.xml.rpc.handler.HandlerChain; //导入依赖的package包/类
private void initHandlerChain(QName portName, HandlerRegistry handlerRegistry,
        HandlerInfo handlerInfo, ArrayList<String> soaprolesToAdd) {
    HandlerChain handlerChain = (HandlerChain) handlerRegistry.getHandlerChain(portName);
    @SuppressWarnings("unchecked") // Can't change the API
    Iterator<Handler> iter = handlerChain.iterator();
    while (iter.hasNext()) {
        Handler handler = iter.next();
        handler.init(handlerInfo);
    }
    String[] soaprolesRegistered = handlerChain.getRoles();
    String [] soaproles = new String[soaprolesRegistered.length + soaprolesToAdd.size()];
    int i;
    for (i = 0;i < soaprolesRegistered.length; i++)
        soaproles[i] = soaprolesRegistered[i];
    for (int j = 0; j < soaprolesToAdd.size(); j++)
        soaproles[i+j] = soaprolesToAdd.get(j);
    handlerChain.setRoles(soaproles);
    handlerRegistry.setHandlerChain(portName, handlerChain);
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:20,代码来源:ServiceRefFactory.java


示例2: getJPlagStub

import javax.xml.rpc.handler.HandlerChain; //导入依赖的package包/类
protected JPlagTyp_Stub getJPlagStub() {
     if (stub == null) {
         stub = (JPlagTyp_Stub) (new JPlagService_Impl()
                 .getJPlagServicePort());

         HandlerChain handlerchain = stub._getHandlerChain();
@SuppressWarnings("unchecked")
Iterator<Handler> handlers = handlerchain.iterator();
         while (handlers.hasNext()) {
	Handler handler = handlers.next();
             if (handler instanceof JPlagClientAccessHandler) {
                 accessHandler = ((JPlagClientAccessHandler) handler);
                 break;
             }
         }
     }
     if (accessHandler != null) {
         accessHandler.setUserPassObjects(atujplag.getUsername(),
                 atujplag.getPassword());
     }
     return stub;
 }
 
开发者ID:jplag,项目名称:jplag,代码行数:23,代码来源:SimpleClient.java


示例3: generateStub

import javax.xml.rpc.handler.HandlerChain; //导入依赖的package包/类
private JPlagTyp_Stub generateStub() {
	if (this.stub == null) {
		stub = (JPlagTyp_Stub) (new JPlagService_Impl()
				.getJPlagServicePort());

		HandlerChain handlerchain = stub._getHandlerChain();
		@SuppressWarnings("unchecked")
		Iterator<Handler> handlers = handlerchain.iterator();
		while (handlers.hasNext()) {
			Handler handler = handlers.next();
			if (handler instanceof JPlagClientAccessHandler) {
				this.accessHandler = ((JPlagClientAccessHandler) handler);
				break;
			}
		}
	}
	if (accessHandler != null) {
		accessHandler.setUserPassObjects(atujplag.getUsername(),
				atujplag.getPassword());
	}
	return this.stub;
}
 
开发者ID:jplag,项目名称:jplag,代码行数:23,代码来源:SubmittedClient.java


示例4: getJPlagStub

import javax.xml.rpc.handler.HandlerChain; //导入依赖的package包/类
/**
 * Returns a singleton JPlag stub
 * 
 * @return The JPlag stub object
 */
public JPlagTyp_Stub getJPlagStub() {
	if (stub == null) {
		stub = (JPlagTyp_Stub) (new JPlagService_Impl().getJPlagServicePort());

		HandlerChain handlerchain = stub._getHandlerChain();
		@SuppressWarnings("unchecked")
		Iterator<Handler> handlers = handlerchain.iterator();
		while (handlers.hasNext()) {
			Handler handler = handlers.next();
			if (handler instanceof JPlagClientAccessHandler) {
				accessHandler = ((JPlagClientAccessHandler) handler);
				break;
			}
		}
	}
	return stub;
}
 
开发者ID:jplag,项目名称:jplag,代码行数:23,代码来源:AdminTool.java


示例5: JPlagBean

import javax.xml.rpc.handler.HandlerChain; //导入依赖的package包/类
public JPlagBean() {
	// Setup SSL stuff to allow message encryption
	//		System.setProperty("javax.net.ssl.trustStorePassword", "gulpie!");
	//		System.setProperty("javax.net.ssl.trustStore", System.getProperty("catalina.home") + File.separator + "server.trust");
	//		System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
	//		java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

	stub = (JPlagTyp_Stub) (new JPlagService_Impl().getJPlagServicePort());

	// Set the server page login data

	HandlerChain handlerchain = stub._getHandlerChain();
	@SuppressWarnings("unchecked")
	Iterator<Handler> handlers = handlerchain.iterator();
	while (handlers.hasNext()) {
		Handler handler = handlers.next();
		if (handler instanceof JPlagClientAccessHandler) {
			((JPlagClientAccessHandler) handler).setUserPassObjects("JPlagJSP", "#Ca+#h8n4un!");
			return;
		}
	}
	throw new RuntimeException("JPlagBean(): Unable to find client access" + " handler!");
}
 
开发者ID:jplag,项目名称:jplag,代码行数:24,代码来源:JPlagBean.java


示例6: getJplagStub

import javax.xml.rpc.handler.HandlerChain; //导入依赖的package包/类
public JPlagTyp_Stub getJplagStub() {
	if (stub == null) {
		stub = (JPlagTyp_Stub) (new JPlagService_Impl().getJPlagServicePort());

		HandlerChain handlerchain = stub._getHandlerChain();
		@SuppressWarnings("unchecked")
		Iterator<Handler> handlers = handlerchain.iterator();
		while (handlers.hasNext()) {
			Handler handler = handlers.next();
			if (handler instanceof JPlagClientAccessHandler) {
				accessHandler = ((JPlagClientAccessHandler) handler);
				break;
			}
		}
	}
	if (accessHandler != null) {
		accessHandler.setUserPassObjects(getJUsernameField().getText(), String.valueOf(getJPasswordField().getPassword()));
	}
	return stub;
}
 
开发者ID:jplag,项目名称:jplag,代码行数:21,代码来源:JplagSwingClient.java


示例7: initHandlerChain

import javax.xml.rpc.handler.HandlerChain; //导入依赖的package包/类
private void initHandlerChain(QName portName, HandlerRegistry handlerRegistry,
        HandlerInfo handlerref, ArrayList soaprolesToAdd) {
    HandlerChain handlerList = (HandlerChain) handlerRegistry.getHandlerChain(portName);
    handlerList.add(handlerref);
    String[] soaprolesRegistered = handlerList.getRoles();
    String [] soaproles = new String[soaprolesRegistered.length + soaprolesToAdd.size()];
    int i;
    for (i = 0;i < soaprolesRegistered.length; i++)
        soaproles[i] = soaprolesRegistered[i];
    for (int j = 0; j < soaprolesToAdd.size(); j++)
        soaproles[i+j] = (String) soaprolesToAdd.get(j);
    handlerList.setRoles(soaproles);
    handlerRegistry.setHandlerChain(portName, handlerList);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:ServiceRefFactory.java


示例8: getJAXRPChandlerChain

import javax.xml.rpc.handler.HandlerChain; //导入依赖的package包/类
protected HandlerChain getJAXRPChandlerChain(MessageContext context) {
    QName portQName = (QName) context.getProperty(Call.WSDL_PORT_NAME);
    if (portQName == null) {
        return null;
    }
    String portName = portQName.getLocalPart();

    SeiFactory seiFactory = (SeiFactory) portNameToSEIFactoryMap.get(portName);
    if (seiFactory == null) {
        return null;
    }
    HandlerChain handlerChain = seiFactory.createHandlerChain();
    return handlerChain;
}
 
开发者ID:apache,项目名称:tomee,代码行数:15,代码来源:AxisClientImpl.java


示例9: main

import javax.xml.rpc.handler.HandlerChain; //导入依赖的package包/类
public static void main(String[] args) {

		if (args.length != 2) {
			System.out.println("jplan CLI needs two parameters: username and password!");
			System.exit(1);
		}

		try {
			JplagClient jpClient = new JplagClient();
			jpClient.stub = (JPlagTyp_Stub) (new JPlagService_Impl().getJPlagServicePort());

			HandlerChain handlerchain = jpClient.stub._getHandlerChain();
			@SuppressWarnings("rawtypes")
			Iterator handlers = handlerchain.iterator();
			while (handlers.hasNext()) {
				Handler handler = (Handler) handlers.next();
				if (handler instanceof JPlagClientAccessHandler) {
					jpClient.accessHandler = ((JPlagClientAccessHandler) handler);
					break;
				}
			}
			if (jpClient.accessHandler == null) {
				System.out.println("Unable to find access handler!");
			} else {
				jpClient.accessHandler.setUserPassObjects(args[0], args[1]);
			}

			ServerInfo serverInfo = jpClient.invoke_getServerInfo();
			String lstr = "";
			LanguageInfo[] langs = serverInfo.getLanguageInfos();
			for (int i = 0; i < langs.length; i++) {
				lstr += "\nLanguage: " + langs[i].getName() + "\nSuffixes: ";
				String[] suf = langs[i].getSuffixes();
				for (int j = 0; j < suf.length; j++)
					lstr += suf[j] + ((j < suf.length - 1) ? "," : "");
				lstr += "\nDefault minimum token length: " + langs[i].getDefMinMatchLen() + "\n";
			}

			String str = "";
			Submission[] subs = serverInfo.getSubmissions();
			for (int i = 0; i < subs.length; i++) {
				str += "Submission ID: " + subs[i].getSubmissionID() + " Title: " + subs[i].getTitle() + " Date: " + subs[i].getDate()
						+ "\n";
			}

			System.out.println("Left submission slots: " + serverInfo.getUserInfo().getLeftSubmissionSlots());
			System.out.println("Account end date: " + serverInfo.getUserInfo().getExpires());
			System.out.println("List of languages:\n" + lstr + "\nList of submissions on server:\n" + str);

			if (args.length == 2) {
				String containerid = jpClient.invoke_compareSource(args);
				Status status;
				System.out.println("Waiting for server to be done...");
				do {
					Thread.sleep(4000);
					status = jpClient.stub.getStatus(containerid);
					System.out.println("State=" + status.getState() + " Progress=" + status.getProgress());
					//					System.out.flush();
				} while (status.getState() >= WAITING_IN_QUEUE && status.getState() < COMPARE_SOURCE_DONE);
				if (status.getState() == BAD_USER_ID) {
					System.out.println("ARGH! Where did my container go?!?      " + status.getReport());
				} else if (status.getState() == UNKOWN_ERROR_OCCURED || status.getState() == BAD_LANGUAGE_ERROR
						|| status.getState() == NO_ENOUGH_SUBMISSIONS_ERROR) {
					System.out.println("Error occurred: " + status.getReport());
				} else {
					jpClient.extractPart(jpClient.stub.getResult(containerid), args[1]);
				}
			}

		} catch (Exception ex) {
			if (ex instanceof JPlagException) {
				JPlagException jex = (JPlagException) ex;
				System.out.println(jex.getExceptionType());
				System.out.println(jex.getDescription());
				System.out.println(jex.getRepair());
			}
			ex.printStackTrace();
		}
	}
 
开发者ID:jplag,项目名称:jplag,代码行数:80,代码来源:JplagClient.java


示例10: createHandlerChain

import javax.xml.rpc.handler.HandlerChain; //导入依赖的package包/类
public HandlerChain createHandlerChain() {
    return handlerInfoChainFactory.createHandlerChain();
}
 
开发者ID:apache,项目名称:tomee,代码行数:4,代码来源:SeiFactoryImpl.java


示例11: createHandlerChain

import javax.xml.rpc.handler.HandlerChain; //导入依赖的package包/类
HandlerChain createHandlerChain(); 
开发者ID:apache,项目名称:tomee,代码行数:2,代码来源:SeiFactory.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java SessionFactoryOptions类代码示例发布时间:2022-05-22
下一篇:
Java PopupFactoryImpl类代码示例发布时间: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