本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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;
}
示例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!");
}
示例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;
}
示例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);
}
示例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;
}
示例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();
}
}
示例10: createHandlerChain
import javax.xml.rpc.handler.HandlerChain; //导入依赖的package包/类
public HandlerChain createHandlerChain() {
return handlerInfoChainFactory.createHandlerChain();
}
示例11: createHandlerChain
import javax.xml.rpc.handler.HandlerChain; //导入依赖的package包/类
HandlerChain createHandlerChain();