@Override protected Transceiver getTransceiver(SocketChannel channel) throws IOException { return new SaslSocketTransceiver(channel, factory.getServer()); }
/** * Called by {@link Requestor#request(String,Object,Callback)} for two-way messages using callbacks. */ public void transceive(List<ByteBuffer> request, Callback<List<ByteBuffer>> callback) throws IOException { // The default implementation works synchronously try { List<ByteBuffer> response = transceive(request); callback.handleResult(response); } catch (IOException e) { callback.handleError(e); } }
@Override public List<ByteBuffer> transceive(List<ByteBuffer> request) throws IOException { return responder.respond(request); }
@Override public String hello(String greeting) throws AvroRemoteException { releaseEnterPermit(); acquireRunPermit(); try { return super.hello(greeting); } finally { releaseRunPermit(); } }
@Override public int add(int arg1, int arg2) throws AvroRemoteException { releaseEnterPermit(); acquireRunPermit(); try { return super.add(arg1, arg2); } finally { releaseRunPermit(); } }
@Override public TestRecord echo(TestRecord record) throws AvroRemoteException { releaseEnterPermit(); acquireRunPermit(); try { return super.echo(record); } finally { releaseRunPermit(); } }
@Override public void ack() { releaseEnterPermit(); acquireRunPermit(); try { super.ack(); } finally { releaseRunPermit(); } }
@Override public ByteBuffer echoBytes(ByteBuffer data) throws AvroRemoteException { releaseEnterPermit(); acquireRunPermit(); try { return super.echoBytes(data); } finally { releaseRunPermit(); } }
@Override public void error() throws AvroRemoteException, TestError { releaseEnterPermit(); acquireRunPermit(); try { super.error(); } finally { releaseRunPermit(); } }
/** * Sets the value of the 'clientHash' field. * @param value The value of 'clientHash'. * @return This builder. */ public org.apache.avro.ipc.HandshakeRequest.Builder setClientHash(org.apache.avro.ipc.MD5 value) { validate(fields()[0], value); this.clientHash = value; fieldSetFlags()[0] = true; return this; }
/** * Creates a new HandshakeRequest RecordBuilder by copying an existing Builder. * @param other The existing builder to copy. * @return A new HandshakeRequest RecordBuilder */ public static org.apache.avro.ipc.HandshakeRequest.Builder newBuilder(org.apache.avro.ipc.HandshakeRequest.Builder other) { if (other == null) { return new org.apache.avro.ipc.HandshakeRequest.Builder(); } else { return new org.apache.avro.ipc.HandshakeRequest.Builder(other); } }
/** * Checks whether the 'serverHash' field has been set. * @return True if the 'serverHash' field has been set, false otherwise. */ public boolean hasServerHash() { return fieldSetFlags()[2]; }
/** * Clears the value of the 'match' field. * @return This builder. */ public org.apache.avro.ipc.HandshakeResponse.Builder clearMatch() { match = null; fieldSetFlags()[0] = false; return this; }
/** Create using SASL's anonymous (<a * href="http://www.ietf.org/rfc/rfc2245.txt">RFC 2245) mechanism. */ public SaslSocketTransceiver(SocketAddress address) throws IOException { this(address, new AnonymousClient()); }
/** * Creates a new HandshakeResponse RecordBuilder. * @return A new HandshakeResponse RecordBuilder */ public static org.apache.avro.ipc.HandshakeResponse.Builder newBuilder() { return new org.apache.avro.ipc.HandshakeResponse.Builder(); }
@Override public void handleResult(TestRecord result) { future2.handleResult(result); } @Override
@Override public void handleError(Throwable error) { future2.handleError(error); } });
/** * Creates a new HandshakeRequest RecordBuilder by copying an existing HandshakeRequest instance. * @param other The existing instance to copy. * @return A new HandshakeRequest RecordBuilder */ public static org.apache.avro.ipc.HandshakeRequest.Builder newBuilder(org.apache.avro.ipc.HandshakeRequest other) { if (other == null) { return new org.apache.avro.ipc.HandshakeRequest.Builder(); } else { return new org.apache.avro.ipc.HandshakeRequest.Builder(other); } }
/** * Clears the value of the 'serverHash' field. * @return This builder. */ public org.apache.avro.ipc.HandshakeRequest.Builder clearServerHash() { serverHash = null; fieldSetFlags()[2] = false; return this; }
/** * Clears the value of the 'meta' field. * @return This builder. */ public org.apache.avro.ipc.HandshakeResponse.Builder clearMeta() { meta = null; fieldSetFlags()[3] = false; return this; }