private BasicFuture<E> removeRequest(final SessionRequest request) { final BasicFuture<E> future = this.pending.remove(request); Asserts.notNull(future, "Session request future"); return future; }
private BasicFuture<E> removeRequest(final SessionRequest request) { final BasicFuture<E> future = this.pending.remove(request); Asserts.notNull(future, "Session request future"); return future; }
/** * @since 4.4 */ protected AbstractCookieSpec(final HashMap<String, CookieAttributeHandler> map) { super(); Asserts.notNull(map, "Attribute handler map"); this.attribHandlerMap = new ConcurrentHashMap<String, CookieAttributeHandler>(map); }
/** * @since 4.4 */ protected AbstractCookieSpec(final HashMap<String, CookieAttributeHandler> map) { super(); Asserts.notNull(map, "Attribute handler map"); this.attribHandlerMap = new ConcurrentHashMap<String, CookieAttributeHandler>(map); }
/** * @since 4.4 */ protected AbstractCookieSpec(final HashMap<String, CookieAttributeHandler> map) { super(); Asserts.notNull(map, "Attribute handler map"); this.attribHandlerMap = new ConcurrentHashMap<String, CookieAttributeHandler>(map); }
public HttpEntity builder() { Asserts.notNull(multipartEntityBuilder, "entityBuilder should not be null"); return this.multipartEntityBuilder.build(); } }
/** * @since 4.4 */ protected AbstractCookieSpec(final HashMap<String, CookieAttributeHandler> map) { super(); Asserts.notNull(map, "Attribute handler map"); this.attribHandlerMap = new ConcurrentHashMap<String, CookieAttributeHandler>(map); }
@Override protected void onContentReceived( final ContentDecoder decoder, final IOControl ioctrl) throws IOException { Asserts.notNull(this.buf, "Content buffer"); this.buf.consumeContent(decoder); }
/** * Tracks tunnelling to the target. * * @param secure <code>true</code> if the route is secure, * <code>false</code> otherwise */ public final void tunnelTarget(final boolean secure) { Asserts.check(this.connected, "No tunnel unless connected"); Asserts.notNull(this.proxyChain, "No tunnel without proxy"); this.tunnelled = TunnelType.TUNNELLED; this.secure = secure; }
@Override protected void onContentReceived( final ContentDecoder decoder, final IOControl ioctrl) throws IOException { Asserts.notNull(this.buf, "Content buffer"); this.buf.consumeContent(decoder); }
/** * Tracks tunnelling to the target. * * @param secure {@code true} if the route is secure, * {@code false} otherwise */ public final void tunnelTarget(final boolean secure) { Asserts.check(this.connected, "No tunnel unless connected"); Asserts.notNull(this.proxyChain, "No tunnel without proxy"); this.tunnelled = TunnelType.TUNNELLED; this.secure = secure; }
/** * Tracks tunnelling to the target. * * @param secure {@code true} if the route is secure, * {@code false} otherwise */ public final void tunnelTarget(final boolean secure) { Asserts.check(this.connected, "No tunnel unless connected"); Asserts.notNull(this.proxyChain, "No tunnel without proxy"); this.tunnelled = TunnelType.TUNNELLED; this.secure = secure; }
/** * Tracks tunnelling to the target. * * @param secure {@code true} if the route is secure, * {@code false} otherwise */ public final void tunnelTarget(final boolean secure) { Asserts.check(this.connected, "No tunnel unless connected"); Asserts.notNull(this.proxyChain, "No tunnel without proxy"); this.tunnelled = TunnelType.TUNNELLED; this.secure = secure; }
@Override protected void onContentReceived( final ContentDecoder decoder, final IOControl ioctrl) throws IOException { Asserts.notNull(this.buf, "Content buffer"); this.buf.consumeContent(decoder); }
@Override protected void onContentReceived( final ContentDecoder decoder, final IOControl ioctrl) throws IOException { Asserts.notNull(this.buf, "Content buffer"); this.buf.consumeContent(decoder); }
@Override public IndexResult index(List<Document> docs) { Asserts.notNull(docs,"Document to index should not be null."); Asserts.check(docs.size() > 0, "Should be at least one document to index."); return indexMultipleDocuments(docs, -1); }
@Override public IndexResult index(Document ... docs) { Asserts.notNull(docs,"Document to index should not be null."); Asserts.check(docs.length > 0, "Should be at least one document to index."); return indexMultipleDocuments(Arrays.asList(docs), -1); }
private Header authenticate( final AuthScheme authScheme, final Credentials creds, final HttpRequest request, final HttpContext context) throws AuthenticationException { Asserts.notNull(authScheme, "Auth scheme"); if (authScheme instanceof ContextAwareAuthScheme) { return ((ContextAwareAuthScheme) authScheme).authenticate(creds, request, context); } else { return authScheme.authenticate(creds, request); } }
protected void onContentReceived(ContentDecoder decoder, IOControl ioctrl) throws IOException { Asserts.notNull(buf, "Content buffer"); try { buf.consumeContent(decoder); } catch (BufferFullException e) { throw new EntityTooLargeException(response, "Entity content is too long; larger than " + maxEntitySize + " bytes"); } }
private Header authenticate( final AuthScheme authScheme, final Credentials creds, final HttpRequest request, final HttpContext context) throws AuthenticationException { Asserts.notNull(authScheme, "Auth scheme"); if (authScheme instanceof ContextAwareAuthScheme) { return ((ContextAwareAuthScheme) authScheme).authenticate(creds, request, context); } else { return authScheme.authenticate(creds, request); } }