public void addMethod(Method method) { supervisor.addMethod(method); }
@Override public final void attach(RPCNetwork net) { this.net = net; String prefix = net.getIdentity().getServicePrefix(); if (prefix != null && prefix.length() > 0) { clientIdent = "'" + prefix + "'"; serverIdent = clientIdent; } net.getSupervisor().addMethod(buildMethod()); }
private void declareFileDistributionMethods() { // Legacy method, needs to be the same name as used in filedistributor supervisor.addMethod(new Method("waitFor", "s", "s", this, "getFile") .methodDesc("get path to file reference") .paramDesc(0, "file reference", "file reference") .returnDesc(0, "path", "path to file")); supervisor.addMethod(new Method("filedistribution.getFile", "s", "s", this, "getFile") .methodDesc("get path to file reference") .paramDesc(0, "file reference", "file reference") .returnDesc(0, "path", "path to file")); supervisor.addMethod(new Method("filedistribution.getActiveFileReferencesStatus", "", "SD", this, "getActiveFileReferencesStatus") .methodDesc("download status for file references") .returnDesc(0, "file references", "array of file references") .returnDesc(1, "download status", "percentage downloaded of each file reference in above array")); supervisor.addMethod(new Method("filedistribution.setFileReferencesToDownload", "S", "i", this, "setFileReferencesToDownload") .methodDesc("set which file references to download") .paramDesc(0, "file references", "file reference to download") .returnDesc(0, "ret", "0 if success, 1 otherwise")); }
m.methodDesc("Method that may be used to " + "check if the server is online"); parent.addMethod(m); m.returnDesc(1, "params", "Method parameter types"); m.returnDesc(2, "return", "Method return types"); parent.addMethod(m); m.returnDesc(5, "returnNames", "Method return value names"); m.returnDesc(6, "returnDesc", "Method return value descriptions"); parent.addMethod(m);
.returnDesc(0, "names", "The rpcserver names this server wants to serve"); orb.addMethod(m_list); m_unreg = new Method("slobrok.callback.notifyUnregistered", "s", "", new MethodHandler() { .methodDesc("Notify a server about removed registration") .paramDesc(0, "name", "RpcServer name"); orb.addMethod(m_unreg); updateTask.scheduleNow();
private void registerMethods() { orb.addMethod(new Method("slobrok.registerRpcServer", "ss", "", new MethodHandler() { public void invoke(Request req) { .paramDesc(0, "name", "RpcServer name") .paramDesc(1, "spec", "The connection specification")); orb.addMethod(new Method("slobrok.unregisterRpcServer", "ss", "", new MethodHandler() { public void invoke(Request req) { .paramDesc(1, "spec", "The connection specification")); orb.addMethod(new Method("slobrok.incremental.fetch", "ii", "iSSSi", new MethodHandler() { public void invoke(Request req) {
method.methodDesc("Retrieves the message bus version."); method.returnDesc(0, "version", "The message bus version."); orb.addMethod(method);