Code example for BasicHttpContext

Methods: setAttribute

0
	} 
 
	public static HttpContext getHttpContext(CookieStore cookieStore)
	{ 
		// Create local HTTP context 
		HttpContext localContext = new BasicHttpContext();
		// Bind custom cookie store to the local context 
		localContext.setAttribute(ClientContext.COOKIE_STORE, cookieStore);
		return localContext;
	} 
 
	@SuppressWarnings("unchecked") 
	public static <R extends Result> void processResult(Object result,
			final AsyncCallback<R> callback)
	{ 
		try 
		{ 
			if (result == null || result instanceof Result)
			{ 
				callback.onSuccess((R) result);
			} else if (result instanceof Throwable)