• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java Handler类的典型用法和代码示例

java 17次浏览

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

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

示例1: initHandlerChain

点赞 3

import javax.xml.rpc.handler.Handler; //导入依赖的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

点赞 3

import javax.xml.rpc.handler.Handler; //导入依赖的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

点赞 3

import javax.xml.rpc.handler.Handler; //导入依赖的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

点赞 3

import javax.xml.rpc.handler.Handler; //导入依赖的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

点赞 3

import javax.xml.rpc.handler.Handler; //导入依赖的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

点赞 3

import javax.xml.rpc.handler.Handler; //导入依赖的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


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)