protected Responder(Protocol local) { this.local = local; this.localHash = new MD5(); localHash.bytes(local.getMD5()); protocols.put(localHash, local); this.rpcMetaPlugins = new CopyOnWriteArrayList<>(); }
this.clientHash = new org.apache.avro.ipc.MD5(); in.readFixed(this.clientHash.bytes(), 0, 16); this.serverHash = new org.apache.avro.ipc.MD5(); in.readFixed(this.serverHash.bytes(), 0, 16); this.clientHash = new org.apache.avro.ipc.MD5(); in.readFixed(this.clientHash.bytes(), 0, 16); break; this.serverHash = new org.apache.avro.ipc.MD5(); in.readFixed(this.serverHash.bytes(), 0, 16); break;
private void writeHandshake(Encoder out) throws IOException { if (getTransceiver().isConnected()) return; MD5 localHash = new MD5(); localHash.bytes(local.getMD5()); String remoteName = transceiver.getRemoteName(); MD5 remoteHash = REMOTE_HASHES.get(remoteName); if (remoteHash == null) { // guess remote is local remoteHash = localHash; remote = local; } else { remote = REMOTE_PROTOCOLS.get(remoteHash); } HandshakeRequest handshake = new HandshakeRequest(); handshake.clientHash = localHash; handshake.serverHash = remoteHash; if (sendLocalText) handshake.clientProtocol = local.toString(); RPCContext context = new RPCContext(); context.setHandshakeRequest(handshake); for (RPCPlugin plugin : rpcMetaPlugins) { plugin.clientStartConnect(context); } handshake.meta = context.requestHandshakeMeta(); HANDSHAKE_WRITER.write(handshake, out); }
} else { out.writeIndex(1); out.writeFixed(this.serverHash.bytes(), 0, 16);
protected Responder(Protocol local) { this.local = local; this.localHash = new MD5(); localHash.bytes(local.getMD5()); protocols.put(localHash, local); this.rpcMetaPlugins = Collections.synchronizedList(new ArrayList<RPCPlugin>()); }
protected Responder(Protocol local) { this.local = local; this.localHash = new MD5(); localHash.bytes(local.getMD5()); protocols.put(localHash, local); this.rpcMetaPlugins = Collections.synchronizedList(new ArrayList<RPCPlugin>()); }
protected Responder(Protocol local) { this.local = local; this.localHash = new MD5(); localHash.bytes(local.getMD5()); protocols.put(localHash, local); this.rpcMetaPlugins = new CopyOnWriteArrayList<RPCPlugin>(); }
private void writeHandshake(Encoder out) throws IOException { MD5 localHash = new MD5(); localHash.bytes(local.getMD5()); String remoteName = transceiver.getRemoteName(); MD5 remoteHash = REMOTE_HASHES.get(remoteName); remote = REMOTE_PROTOCOLS.get(remoteHash); if (remoteHash == null) { // guess remote is local remoteHash = localHash; remote = local; } HandshakeRequest handshake = new HandshakeRequest(); handshake.clientHash = localHash; handshake.serverHash = remoteHash; if (sendLocalText) handshake.clientProtocol = new Utf8(local.toString()); RPCContext context = new RPCContext(); for (RPCPlugin plugin : rpcMetaPlugins) { plugin.clientStartConnect(context); } handshake.meta = context.requestHandshakeMeta(); HANDSHAKE_WRITER.write(handshake, out); }
private void writeHandshake(Encoder out) throws IOException { if (getTransceiver().isConnected()) return; MD5 localHash = new MD5(); localHash.bytes(local.getMD5()); String remoteName = transceiver.getRemoteName(); MD5 remoteHash = REMOTE_HASHES.get(remoteName); remote = REMOTE_PROTOCOLS.get(remoteHash); if (remoteHash == null) { // guess remote is local remoteHash = localHash; remote = local; } HandshakeRequest handshake = new HandshakeRequest(); handshake.clientHash = localHash; handshake.serverHash = remoteHash; if (sendLocalText) handshake.clientProtocol = new Utf8(local.toString()); RPCContext context = new RPCContext(); for (RPCPlugin plugin : rpcMetaPlugins) { plugin.clientStartConnect(context); } handshake.meta = context.requestHandshakeMeta(); HANDSHAKE_WRITER.write(handshake, out); }
private void writeHandshake(Encoder out) throws IOException { if (getTransceiver().isConnected()) return; MD5 localHash = new MD5(); localHash.bytes(local.getMD5()); String remoteName = transceiver.getRemoteName(); MD5 remoteHash = REMOTE_HASHES.get(remoteName); if (remoteHash == null) { // guess remote is local remoteHash = localHash; remote = local; } else { remote = REMOTE_PROTOCOLS.get(remoteHash); } HandshakeRequest handshake = new HandshakeRequest(); handshake.clientHash = localHash; handshake.serverHash = remoteHash; if (sendLocalText) handshake.clientProtocol = local.toString(); RPCContext context = new RPCContext(); context.setHandshakeRequest(handshake); for (RPCPlugin plugin : rpcMetaPlugins) { plugin.clientStartConnect(context); } handshake.meta = context.requestHandshakeMeta(); HANDSHAKE_WRITER.write(handshake, out); }