Package org.gcube.event.publisher
Class AbstractHTTPWithJWTTokenAuthEventSender
- java.lang.Object
-
- org.gcube.event.publisher.AbstractHTTPWithJWTTokenAuthEventSender
-
- All Implemented Interfaces:
EventSender
- Direct Known Subclasses:
HTTPWithOIDCAuthEventSender
public abstract class AbstractHTTPWithJWTTokenAuthEventSender extends Object implements EventSender
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classAbstractHTTPWithJWTTokenAuthEventSender.HTTPGetclassAbstractHTTPWithJWTTokenAuthEventSender.HTTPPostclassAbstractHTTPWithJWTTokenAuthEventSender.HTTPVerb
-
Field Summary
Fields Modifier and Type Field Description protected URLbaseEndpointURLprotected StringclientIdprotected StringclientSecretprotected intconnectionTimeoutprotected static org.slf4j.Loggerlogprotected intreadTimeoutprotected URLtokenURL
-
Constructor Summary
Constructors Constructor Description AbstractHTTPWithJWTTokenAuthEventSender(URL baseEndpointURL, String clientId, String clientSecret, URL tokenURL)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract org.gcube.oidc.rest.JWTTokengetAuthorizationToken()intgetConnectionTimeout()protected intgetDefaultConnectionTimeout()protected intgetDefaultReadTimeout()intgetReadTimeout()protected URLgetTokenURL()org.json.simple.JSONObjectretrive(String id)voidsend(Event event)StringsendAndGetResult(Event event)voidsetConnectionTimeout(int connectionTimeout)voidsetReadTimeout(int readTimeout)
-
-
-
Field Detail
-
log
protected static final org.slf4j.Logger log
-
baseEndpointURL
protected URL baseEndpointURL
-
clientId
protected String clientId
-
clientSecret
protected String clientSecret
-
tokenURL
protected URL tokenURL
-
connectionTimeout
protected int connectionTimeout
-
readTimeout
protected int readTimeout
-
-
Method Detail
-
getDefaultReadTimeout
protected int getDefaultReadTimeout()
-
getDefaultConnectionTimeout
protected int getDefaultConnectionTimeout()
-
getReadTimeout
public int getReadTimeout()
-
setReadTimeout
public void setReadTimeout(int readTimeout)
-
getConnectionTimeout
public int getConnectionTimeout()
-
setConnectionTimeout
public void setConnectionTimeout(int connectionTimeout)
-
send
public void send(Event event)
- Specified by:
sendin interfaceEventSender
-
sendAndGetResult
public String sendAndGetResult(Event event)
- Specified by:
sendAndGetResultin interfaceEventSender
-
retrive
public org.json.simple.JSONObject retrive(String id)
- Specified by:
retrivein interfaceEventSender
-
getTokenURL
protected URL getTokenURL()
-
getAuthorizationToken
protected abstract org.gcube.oidc.rest.JWTToken getAuthorizationToken() throws org.gcube.oidc.rest.OpenIdConnectRESTHelperException- Throws:
org.gcube.oidc.rest.OpenIdConnectRESTHelperException
-
-