Added also setter/getter methods for connection and read timeouts
This commit is contained in:
parent
edfe561608
commit
38259734b1
|
@ -35,18 +35,34 @@ public abstract class AbstractHTTPWithJWTTokenAuthEventSender implements EventSe
|
||||||
this.clientId = clientId;
|
this.clientId = clientId;
|
||||||
this.clientSecret = clientSecret;
|
this.clientSecret = clientSecret;
|
||||||
this.tokenURL = tokenURL;
|
this.tokenURL = tokenURL;
|
||||||
connectionTimeout = getConnectionTimeout();
|
connectionTimeout = getDefaultConnectionTimeout();
|
||||||
readTimeout = getReadTimeout();
|
readTimeout = getDefaultReadTimeout();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int getReadTimeout() {
|
protected int getDefaultReadTimeout() {
|
||||||
return HTTPVerb.DEFAULT_READ_TIMEOUT;
|
return HTTPVerb.DEFAULT_READ_TIMEOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int getConnectionTimeout() {
|
protected int getDefaultConnectionTimeout() {
|
||||||
return HTTPVerb.DEFAULT_CONNECTION_TIMEOUT;
|
return HTTPVerb.DEFAULT_CONNECTION_TIMEOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getReadTimeout() {
|
||||||
|
return readTimeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReadTimeout(int readTimeout) {
|
||||||
|
this.readTimeout = readTimeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getConnectionTimeout() {
|
||||||
|
return connectionTimeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConnectionTimeout(int connectionTimeout) {
|
||||||
|
this.connectionTimeout = connectionTimeout;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void send(Event event) {
|
public void send(Event event) {
|
||||||
log.debug("Starting HTTP POST thread to: {}", baseEndpointURL);
|
log.debug("Starting HTTP POST thread to: {}", baseEndpointURL);
|
||||||
|
|
Loading…
Reference in New Issue