private static boolean methodExists(int methodHash, long version, Map<Long, ProtocolSignature> versionMap) { ProtocolSignature sig = versionMap.get(version); if (sig != null) { for (int m : sig.getMethods()) { if (m == methodHash) { return true; } } } return false; }
private void fetchServerMethods(Method method) throws IOException { long clientVersion; clientVersion = RPC.getProtocolVersion(method.getDeclaringClass()); int clientMethodsHash = ProtocolSignature.getFingerprint(method .getDeclaringClass().getMethods()); ProtocolSignature serverInfo = ((VersionedProtocol) proxy) .getProtocolSignature(RPC.getProtocolName(protocol), clientVersion, clientMethodsHash); long serverVersion = serverInfo.getVersion(); if (serverVersion != clientVersion) { throw new RPC.VersionMismatch(protocol.getName(), clientVersion, serverVersion); } int[] serverMethodsCodes = serverInfo.getMethods(); if (serverMethodsCodes != null) { serverMethods = new HashSet<Integer>(serverMethodsCodes.length); for (int m : serverMethodsCodes) { this.serverMethods.add(Integer.valueOf(m)); } } serverMethodsFetched = true; }
ProtocolSignature signature = ProtocolSignature.getProtocolSignature( protocol, v); for (int m : signature.getMethods()) { sigBuilder.addMethods(m);
private static boolean methodExists(int methodHash, long version, Map<Long, ProtocolSignature> versionMap) { ProtocolSignature sig = versionMap.get(version); if (sig != null) { for (int m : sig.getMethods()) { if (m == methodHash) { return true; } } } return false; }
private static boolean methodExists(int methodHash, long version, Map<Long, ProtocolSignature> versionMap) { ProtocolSignature sig = versionMap.get(version); if (sig != null) { for (int m : sig.getMethods()) { if (m == methodHash) { return true; } } } return false; }
private static boolean methodExists(int methodHash, long version, Map<Long, ProtocolSignature> versionMap) { ProtocolSignature sig = versionMap.get(version); if (sig != null) { for (int m : sig.getMethods()) { if (m == methodHash) { return true; } } } return false; }
private static boolean methodExists(int methodHash, long version, Map<Long, ProtocolSignature> versionMap) { ProtocolSignature sig = versionMap.get(version); if (sig != null) { for (int m : sig.getMethods()) { if (m == methodHash) { return true; } } } return false; }
private void fetchServerMethods(Method method) throws IOException { long clientVersion; clientVersion = RPC.getProtocolVersion(method.getDeclaringClass()); int clientMethodsHash = ProtocolSignature.getFingerprint(method .getDeclaringClass().getMethods()); ProtocolSignature serverInfo = ((VersionedProtocol) proxy) .getProtocolSignature(RPC.getProtocolName(protocol), clientVersion, clientMethodsHash); long serverVersion = serverInfo.getVersion(); if (serverVersion != clientVersion) { throw new RPC.VersionMismatch(protocol.getName(), clientVersion, serverVersion); } int[] serverMethodsCodes = serverInfo.getMethods(); if (serverMethodsCodes != null) { serverMethods = new HashSet<Integer>(serverMethodsCodes.length); for (int m : serverMethodsCodes) { this.serverMethods.add(Integer.valueOf(m)); } } serverMethodsFetched = true; }
private void fetchServerMethods(Method method) throws IOException { long clientVersion; clientVersion = RPC.getProtocolVersion(method.getDeclaringClass()); int clientMethodsHash = ProtocolSignature.getFingerprint(method .getDeclaringClass().getMethods()); ProtocolSignature serverInfo = ((VersionedProtocol) proxy) .getProtocolSignature(RPC.getProtocolName(protocol), clientVersion, clientMethodsHash); long serverVersion = serverInfo.getVersion(); if (serverVersion != clientVersion) { throw new RPC.VersionMismatch(protocol.getName(), clientVersion, serverVersion); } int[] serverMethodsCodes = serverInfo.getMethods(); if (serverMethodsCodes != null) { serverMethods = new HashSet<Integer>(serverMethodsCodes.length); for (int m : serverMethodsCodes) { this.serverMethods.add(Integer.valueOf(m)); } } serverMethodsFetched = true; }
private void fetchServerMethods(Method method) throws IOException { long clientVersion; clientVersion = RPC.getProtocolVersion(method.getDeclaringClass()); int clientMethodsHash = ProtocolSignature.getFingerprint(method .getDeclaringClass().getMethods()); ProtocolSignature serverInfo = ((VersionedProtocol) proxy) .getProtocolSignature(RPC.getProtocolName(protocol), clientVersion, clientMethodsHash); long serverVersion = serverInfo.getVersion(); if (serverVersion != clientVersion) { throw new RPC.VersionMismatch(protocol.getName(), clientVersion, serverVersion); } int[] serverMethodsCodes = serverInfo.getMethods(); if (serverMethodsCodes != null) { serverMethods = new HashSet<Integer>(serverMethodsCodes.length); for (int m : serverMethodsCodes) { this.serverMethods.add(Integer.valueOf(m)); } } serverMethodsFetched = true; }
private void fetchServerMethods(Method method) throws IOException { long clientVersion; clientVersion = RPC.getProtocolVersion(method.getDeclaringClass()); int clientMethodsHash = ProtocolSignature.getFingerprint(method .getDeclaringClass().getMethods()); ProtocolSignature serverInfo = ((VersionedProtocol) proxy) .getProtocolSignature(RPC.getProtocolName(protocol), clientVersion, clientMethodsHash); long serverVersion = serverInfo.getVersion(); if (serverVersion != clientVersion) { throw new RPC.VersionMismatch(protocol.getName(), clientVersion, serverVersion); } int[] serverMethodsCodes = serverInfo.getMethods(); if (serverMethodsCodes != null) { serverMethods = new HashSet<Integer>(serverMethodsCodes.length); for (int m : serverMethodsCodes) { this.serverMethods.add(Integer.valueOf(m)); } } serverMethodsFetched = true; }
ProtocolSignature serverInfo = proxy .getProtocolSignature(protocolName, clientVersion, ProtocolSignature.getFingerprint(protocol.getMethods())); return new ProtocolProxy<T>(protocol, proxy, serverInfo.getMethods()); } catch (RemoteException re) { IOException ioe = re.unwrapRemoteException(IOException.class);
ProtocolSignature signature = ProtocolSignature.getProtocolSignature( protocol, v); for (int m : signature.getMethods()) { sigBuilder.addMethods(m);
ProtocolSignature signature = ProtocolSignature.getProtocolSignature( protocol, v); for (int m : signature.getMethods()) { sigBuilder.addMethods(m);
ProtocolSignature signature = ProtocolSignature.getProtocolSignature( protocol, v); for (int m : signature.getMethods()) { sigBuilder.addMethods(m);
ProtocolSignature signature = ProtocolSignature.getProtocolSignature( protocol, v); for (int m : signature.getMethods()) { sigBuilder.addMethods(m);