/** * @deprecated */ public void setConnectionTimeout(int timeout) { if (hasConnection()) { wrappedConnection.setConnectionTimeout(timeout); } else { // do nothing } }
/** * @deprecated */ public void setConnectionTimeout(int timeout) { if (hasConnection()) { wrappedConnection.setConnectionTimeout(timeout); } else { // do nothing } }
/** * @deprecated */ public void setConnectionTimeout(int timeout) { if (hasConnection()) { wrappedConnection.setConnectionTimeout(timeout); } else { // do nothing } }
/** * @deprecated */ public void setConnectionTimeout(int timeout) { if (hasConnection()) { wrappedConnection.setConnectionTimeout(timeout); } else { // do nothing } }
/** * @deprecated */ public void setConnectionTimeout(int timeout) { if (hasConnection()) { wrappedConnection.setConnectionTimeout(timeout); } else { // do nothing } }
/** * @deprecated */ public void setConnectionTimeout(int timeout) { if (hasConnection()) { wrappedConnection.setConnectionTimeout(timeout); } else { // do nothing } }
httpState.setCredentials(null, repositoryHost, credentials); HttpConnection httpConnection = new HttpConnection(repositoryHost, repositoryPort, protocol); httpConnection.setConnectionTimeout(CONNECTION_TIMEOUT); int state = pollMethod.execute(httpState, httpConnection); if ( state == HttpStatus.SC_MULTI_STATUS ) {
public boolean unsubscribe(String uri, Subscriber listener, Credentials credentials) { UnsubscribeMethod unsubscribeMethod = new UnsubscribeMethod(repositoryDomain+uri); synchronized ( subscribers ) { for ( Iterator i = subscribers.iterator(); i.hasNext(); ) { Subscription subscription = (Subscription)i.next(); if ( subscription.getSubscriber().equals(listener) ) { String id = String.valueOf(subscription.getId()); unsubscribeMethod.addRequestHeader(UnsubscribeMethod.H_SUBSCRIPTION_ID, id); try { unsubscribeMethod.setDoAuthentication(true); HttpState httpState = new HttpState(); httpState.setCredentials(null, repositoryHost, credentials); HttpConnection httpConnection = new HttpConnection(repositoryHost, repositoryPort, protocol); httpConnection.setConnectionTimeout(CONNECTION_TIMEOUT); int state = unsubscribeMethod.execute(httpState, httpConnection); if ( state == HttpStatus.SC_OK ) { i.remove(); return true; } else { logger.log(Level.SEVERE, "Unsubscription failed. State: "+state); } } catch (IOException e) { logger.log(Level.SEVERE, "Unsubscription of listener '"+listener+"' failed!", e); } } } } logger.log(Level.SEVERE, "Listener not unsubscribed!"); return false; }
httpState.setCredentials(null, repositoryHost, credentials); HttpConnection httpConnection = new HttpConnection(repositoryHost, repositoryPort, protocol); httpConnection.setConnectionTimeout(CONNECTION_TIMEOUT); int state = subscribeMethod.execute(httpState, httpConnection); if ( state == HttpStatus.SC_OK ) {