protected <T> LinkedList<T> getInterceptors(Class<T> clazz) { InterceptorType interceptorType = InterceptorType .getInterceptorTypeFor(clazz); if (interceptorType == null) return null; return getInterceptors(interceptorType); }
@Override public <T2> T2 getEntity(Class<T2> type) { return getEntity(type, null); }
@Override // this is synchronized to protect against premature finalize called by the GC protected synchronized final void finalize() throws Throwable { releaseConnection(); }
@Override public <T2> T2 getEntity(Class<T2> type, Type genericType) { return getEntity(type, genericType, getAnnotations(type, genericType)); }
private void applyInterceptors(ClientInterceptorRepositoryImpl repository) { prefixInterceptors.prefixClientInterceptorsTo(repository); suffixInterceptors.copyClientInterceptorsTo(repository); }
protected void setWriterInterceptors( WriterInterceptor[] writerInterceptors) { setData(InterceptorType.MessageBodyWriter, writerInterceptors); }
public synchronized void close() throws IOException { super.close(); // Response object is no longer needed and can be finalized response = null; } }
public static InterceptorType getInterceptorTypeFor(Class<?> type) { for (InterceptorType interceptorType : InterceptorType.values()) { if (type == interceptorType.clazz) { return interceptorType; } } return null; }
public final void releaseConnection() { if (!wasReleased) { if (streamFactory != null) streamFactory.performReleaseConnection(); wasReleased = true; } }
public void followRedirects() { setFollowRedirects(true); } }
protected <T> LinkedList<T> getInterceptors(Class<T> clazz) { InterceptorType interceptorType = InterceptorType .getInterceptorTypeFor(clazz); if (interceptorType == null) return null; return getInterceptors(interceptorType); }
protected void setReaderInterceptors( ReaderInterceptor[] readerInterceptors) { setData(InterceptorType.MessageBodyReader, readerInterceptors); }
@Override // this is synchronized to protect against premature finalize called by the GC protected synchronized final void finalize() throws Throwable { releaseConnection(); }
public synchronized void close() throws IOException { super.close(); // Response object is no longer needed and can be finalized response = null; } }
protected void setWriterInterceptors( WriterInterceptor[] writerInterceptors) { setData(InterceptorType.MessageBodyWriter, writerInterceptors); }
@Override public void close() { releaseConnection(); }
protected void setExecutionInterceptors( Collection<ClientExecutionInterceptor> executionInterceptorList) { setData(InterceptorType.ClientExecution, executionInterceptorList); }
@Override public void close() { releaseConnection(); }
protected void setExecutionInterceptors( ClientExecutionInterceptor[] executionInterceptors) { setData(InterceptorType.ClientExecution, executionInterceptors); }
protected void setExecutionInterceptors( Collection<ClientExecutionInterceptor> executionInterceptorList) { setData(InterceptorType.ClientExecution, executionInterceptorList); }