@UriEndpoint(scheme="gauth",
syntax="gauth:name",
producerOnly=true,
label="cloud")
public class GAuthEndpoint
extends org.apache.camel.impl.DefaultEndpoint
authorize
for
requesting an unauthorized request token or upgrade
for
upgrading an authorized request token to an access token. The corresponding
endpoint URIs are gauth:authorize
and gauth:upgrade
, respectively.Modifier and Type | Class and Description |
---|---|
static class |
GAuthEndpoint.Name |
Constructor and Description |
---|
GAuthEndpoint(String endpointUri,
org.apache.camel.Component component,
String name) |
Modifier and Type | Method and Description |
---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Producer |
createProducer()
Returns a
GAuthProducer |
OutboundBinding<GAuthEndpoint,com.google.gdata.client.authn.oauth.GoogleOAuthParameters,com.google.gdata.client.authn.oauth.GoogleOAuthParameters> |
getAuthorizeBinding() |
String |
getCallback()
Returns the value of callback query parameter in the
gauth:authorize endpoint URI. |
GAuthComponent |
getComponent()
Returns the component instance that created this endpoint.
|
String |
getConsumerKey()
Returns the consumer key.
|
String |
getConsumerSecret()
Returns the consumer secret.
|
GAuthKeyLoader |
getKeyLoader()
Returns the key loader.
|
GAuthEndpoint.Name |
getName()
Returns the endpoint name.
|
String |
getScope()
Returns the value of the scope query parameter in
gauth:authorize endpoint URI. |
String[] |
getScopeArray()
Returns the value of the scope query parameter as array.
|
GAuthService |
getService() |
OutboundBinding<GAuthEndpoint,com.google.gdata.client.authn.oauth.GoogleOAuthParameters,com.google.gdata.client.authn.oauth.GoogleOAuthParameters> |
getUpgradeBinding() |
boolean |
isSingleton()
Returns
true . |
void |
setAuthorizeBinding(OutboundBinding<GAuthEndpoint,com.google.gdata.client.authn.oauth.GoogleOAuthParameters,com.google.gdata.client.authn.oauth.GoogleOAuthParameters> authorizeBinding)
Sets the binding for
gauth:authorize endpoints. |
void |
setCallback(String callback) |
void |
setConsumerKey(String consumerKey)
Sets the consumer key.
|
void |
setConsumerSecret(String consumerSecret)
Sets the consumer secret.
|
void |
setKeyLoader(GAuthKeyLoader keyLoader)
Sets a key loader for loading a private key.
|
void |
setScope(String services) |
void |
setService(GAuthService service)
Sets the service that makes the remote calls to Google services.
|
void |
setUpgradeBinding(OutboundBinding<GAuthEndpoint,com.google.gdata.client.authn.oauth.GoogleOAuthParameters,com.google.gdata.client.authn.oauth.GoogleOAuthParameters> upgradeBinding)
Sets the binding for
gauth:upgrade endpoints. |
configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, getPollingConsumerQueueSize, hashCode, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
public OutboundBinding<GAuthEndpoint,com.google.gdata.client.authn.oauth.GoogleOAuthParameters,com.google.gdata.client.authn.oauth.GoogleOAuthParameters> getAuthorizeBinding()
public void setAuthorizeBinding(OutboundBinding<GAuthEndpoint,com.google.gdata.client.authn.oauth.GoogleOAuthParameters,com.google.gdata.client.authn.oauth.GoogleOAuthParameters> authorizeBinding)
gauth:authorize
endpoints.public OutboundBinding<GAuthEndpoint,com.google.gdata.client.authn.oauth.GoogleOAuthParameters,com.google.gdata.client.authn.oauth.GoogleOAuthParameters> getUpgradeBinding()
public void setUpgradeBinding(OutboundBinding<GAuthEndpoint,com.google.gdata.client.authn.oauth.GoogleOAuthParameters,com.google.gdata.client.authn.oauth.GoogleOAuthParameters> upgradeBinding)
gauth:upgrade
endpoints.public GAuthComponent getComponent()
getComponent
in class org.apache.camel.impl.DefaultEndpoint
public GAuthEndpoint.Name getName()
public String getCallback()
gauth:authorize
endpoint URI.public void setCallback(String callback)
public String getScope()
gauth:authorize
endpoint URI. This can be a single scope or
a comma-separated list of scopes.public void setScope(String services)
public String[] getScopeArray()
getScope()
public String getConsumerKey()
null
then GAuthComponent.getConsumerKey()
is
returned.public void setConsumerKey(String consumerKey)
consumerKey
- consumer key to set.public String getConsumerSecret()
null
then GAuthComponent.getConsumerSecret()
is
returned.public void setConsumerSecret(String consumerSecret)
public GAuthKeyLoader getKeyLoader()
null
then GAuthComponent.getKeyLoader()
is
returned.public void setKeyLoader(GAuthKeyLoader keyLoader)
public GAuthService getService()
public void setService(GAuthService service)
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
public org.apache.camel.Producer createProducer() throws Exception
GAuthProducer
Exception
public boolean isSingleton()
true
.Apache Camel