new ArmeriaMessageDeframer(this, maxInboundMessageSizeBytes, ctx.alloc()), this); executor = callOptions.getExecutor(); req.completionFuture().handle((unused1, unused2) -> { if (!ctx.log().isAvailable(RequestLogAvailability.REQUEST_CONTENT)) {
private Executor getCallExecutor(CallOptions callOptions) { Executor executor = callOptions.getExecutor(); if (executor == null) { executor = this.executor; } return executor; }
private Executor getCallExecutor(CallOptions callOptions) { Executor executor = callOptions.getExecutor(); if (executor == null) { executor = this.executor; } return executor; }
@Override public <RequestT, ResponseT> ClientCall<RequestT, ResponseT> newCall( MethodDescriptor<RequestT, ResponseT> methodDescriptor, CallOptions callOptions) { return new ClientCallImpl<RequestT, ResponseT>(methodDescriptor, callOptions.getExecutor() == null ? executor : callOptions.getExecutor(), callOptions, transportProvider, deadlineCancellationExecutor, channelCallsTracer, false /* retryEnabled */); }
@Override public <RequestT, ResponseT> ClientCall<RequestT, ResponseT> newCall( MethodDescriptor<RequestT, ResponseT> methodDescriptor, CallOptions callOptions) { return new ClientCallImpl<RequestT, ResponseT>(methodDescriptor, callOptions.getExecutor() == null ? executor : callOptions.getExecutor(), callOptions, transportProvider, deadlineCancellationExecutor, channelCallsTracer, false /* retryEnabled */); }
MethodDescriptor<RequestT, ResponseT> methodDescriptor, CallOptions callOptions) { final Executor effectiveExecutor = callOptions.getExecutor() == null ? executor : callOptions.getExecutor(); if (callOptions.isWaitForReady()) { return new ClientCall<RequestT, ResponseT>() {
if (callOptions.getExecutor() != null) { executor = callOptions.getExecutor();
if (callOptions.getExecutor() != null) { executor = callOptions.getExecutor();
new ArmeriaMessageDeframer(this, maxInboundMessageSizeBytes, ctx.alloc()), this); executor = callOptions.getExecutor(); req.completionFuture().handle((unused1, unused2) -> { if (!ctx.log().isAvailable(RequestLogAvailability.REQUEST_CONTENT)) {
@Override @SuppressWarnings("deprecation") public ClientStream newStream( MethodDescriptor<?, ?> method, Metadata headers, CallOptions callOptions) { CallCredentials creds = callOptions.getCredentials(); if (creds != null) { MetadataApplierImpl applier = new MetadataApplierImpl( delegate, method, headers, callOptions); Attributes.Builder effectiveAttrsBuilder = Attributes.newBuilder() .set(CallCredentials.ATTR_AUTHORITY, authority) .set(CallCredentials.ATTR_SECURITY_LEVEL, SecurityLevel.NONE) .setAll(delegate.getAttributes()); if (callOptions.getAuthority() != null) { effectiveAttrsBuilder.set(CallCredentials.ATTR_AUTHORITY, callOptions.getAuthority()); } try { creds.applyRequestMetadata(method, effectiveAttrsBuilder.build(), firstNonNull(callOptions.getExecutor(), appExecutor), applier); } catch (Throwable t) { applier.fail(Status.UNAUTHENTICATED .withDescription("Credentials should use fail() instead of throwing exceptions") .withCause(t)); } return applier.returnStream(); } else { return delegate.newStream(method, headers, callOptions); } } }
@Override public ClientStream newStream( MethodDescriptor<?, ?> method, Metadata headers, CallOptions callOptions) { CallCredentials creds = callOptions.getCredentials(); if (creds != null) { MetadataApplierImpl applier = new MetadataApplierImpl( delegate, method, headers, callOptions); Attributes.Builder effectiveAttrsBuilder = Attributes.newBuilder() .set(CallCredentials.ATTR_AUTHORITY, authority) .set(CallCredentials.ATTR_SECURITY_LEVEL, SecurityLevel.NONE) .setAll(delegate.getAttributes()); if (callOptions.getAuthority() != null) { effectiveAttrsBuilder.set(CallCredentials.ATTR_AUTHORITY, callOptions.getAuthority()); } try { creds.applyRequestMetadata(method, effectiveAttrsBuilder.build(), firstNonNull(callOptions.getExecutor(), appExecutor), applier); } catch (Throwable t) { applier.fail(Status.UNAUTHENTICATED .withDescription("Credentials should use fail() instead of throwing exceptions") .withCause(t)); } return applier.returnStream(); } else { return delegate.newStream(method, headers, callOptions); } } }