本文整理汇总了Java中com.intellij.ide.XmlRpcServer类的典型用法代码示例。如果您正苦于以下问题:Java XmlRpcServer类的具体用法?Java XmlRpcServer怎么用?Java XmlRpcServer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
XmlRpcServer类属于com.intellij.ide包,在下文中一共展示了XmlRpcServer类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: process
import com.intellij.ide.XmlRpcServer; //导入依赖的package包/类
@Override
protected boolean process(@NotNull ChannelHandlerContext context, @NotNull FullHttpRequest request, @NotNull QueryStringDecoder urlDecoder) throws IOException {
if (handlers.isEmpty()) {
// not yet initialized, for example, P2PTransport could add handlers after we bound.
return false;
}
return request.method() == HttpMethod.POST && XmlRpcServer.SERVICE.getInstance().process(urlDecoder.path(), request, context, handlers);
}
示例2: registerHandler
import com.intellij.ide.XmlRpcServer; //导入依赖的package包/类
/**
* Register handler. Note that handlers must be unregistered using {@link #unregisterHandler(int)}.
*
* @param handler a handler to register
* @return an identifier to pass to the environment variable
*/
public int registerHandler(@NotNull T handler) {
synchronized (HANDLERS_LOCK) {
XmlRpcServer xmlRpcServer = XmlRpcServer.SERVICE.getInstance();
if (!xmlRpcServer.hasHandler(myHandlerName)) {
xmlRpcServer.addHandler(myHandlerName, createRpcRequestHandlerDelegate());
}
int key = myNextHandlerKey;
handlers.put(key, handler);
myNextHandlerKey++;
return key;
}
}
示例3: process
import com.intellij.ide.XmlRpcServer; //导入依赖的package包/类
@Override
protected boolean process(@Nonnull ChannelHandlerContext context, @Nonnull FullHttpRequest request, @Nonnull QueryStringDecoder urlDecoder) {
if (handlers.isEmpty()) {
// not yet initialized, for example, P2PTransport could add handlers after we bound.
return false;
}
return request.method() == HttpMethod.POST && XmlRpcServer.SERVICE.getInstance().process(urlDecoder.path(), request, context, handlers);
}
示例4: addInternalHandler
import com.intellij.ide.XmlRpcServer; //导入依赖的package包/类
private void addInternalHandler() {
XmlRpcServer xmlRpcServer = XmlRpcServer.SERVICE.getInstance();
if (!xmlRpcServer.hasHandler(GitRebaseEditorMain.HANDLER_NAME)) {
xmlRpcServer.addHandler(GitRebaseEditorMain.HANDLER_NAME, new InternalHandler());
}
}
示例5: process
import com.intellij.ide.XmlRpcServer; //导入依赖的package包/类
@Override
protected boolean process(ChannelHandlerContext context, HttpRequest request, QueryStringDecoder urlDecoder) throws IOException {
return (request.getMethod() == HttpMethod.POST || request.getMethod() == HttpMethod.OPTIONS) &&
XmlRpcServer.SERVICE.getInstance().process(urlDecoder.getPath(), request, context, handlers);
}