Package com.adaptris.core.http.oauth
Class OauthTokenGetter
java.lang.Object
com.adaptris.core.ServiceImp
com.adaptris.core.http.oauth.OauthTokenGetter
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,MessageEventGenerator
,Service
,StateManagedComponent
- Direct Known Subclasses:
GetAndCacheOauthToken
,GetOauthToken
-
Field Summary
Fields inherited from class com.adaptris.core.ServiceImp
log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
void
prepare()
Prepare for initialisation.void
Set the access token builder.void
Specify how to write the access token once it is retrieved.void
start()
Starts the component.void
stop()
Stop the componentprotected AccessTokenWriter
protected AccessTokenWriter
<T extends OauthTokenGetter>
T<T extends OauthTokenGetter>
TMethods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId
-
Constructor Details
-
OauthTokenGetter
public OauthTokenGetter()
-
-
Method Details
-
prepare
Description copied from interface:ComponentLifecycleExtension
Prepare for initialisation.- Throws:
CoreException
-
tokenWriterIfNull
-
tokenWriterToUse
-
initService
- Specified by:
initService
in classServiceImp
- Throws:
CoreException
-
start
Description copied from interface:ComponentLifecycle
Starts the component.Once a component is started it should be ready to process messages. In the case of
AdaptrisMessageConsumer
, calling start will begin message delivery.- Specified by:
start
in interfaceComponentLifecycle
- Overrides:
start
in classServiceImp
- Throws:
CoreException
- wrapping any underlyingException
s
-
stop
public void stop()Description copied from interface:ComponentLifecycle
Stop the componentA stopped component is not expected to be ready to process messages. In the case of
AdaptrisMessageConsumer
, calling stop will pause message delivery. Throwing aRuntimeException
may cause unintended consequences- Specified by:
stop
in interfaceComponentLifecycle
- Overrides:
stop
in classServiceImp
-
closeService
protected void closeService()- Specified by:
closeService
in classServiceImp
-
withAccessTokenBuilder
-
getAccessTokenBuilder
-
setAccessTokenBuilder
Set the access token builder.- Parameters:
b
- the builder.
-
withAccessTokenWriter
-
getAccessTokenWriter
-
setAccessTokenWriter
Specify how to write the access token once it is retrieved.- Parameters:
b
- the writer.
-