org.apache.camel.component.gae.login
Class GLoginEndpoint

java.lang.Object
  extended by org.apache.camel.impl.DefaultEndpoint
      extended by org.apache.camel.component.gae.login.GLoginEndpoint
All Implemented Interfaces:
CamelContextAware, Endpoint, IsSingleton, Service, HasId

public class GLoginEndpoint
extends DefaultEndpoint

Represents a GLogin Endpoint.


Constructor Summary
GLoginEndpoint(String endpointUri, Component component, String hostName, int devPort)
          Creates a new GLoginEndpoint.
 
Method Summary
 Consumer createConsumer(Processor processor)
          throws UnsupportedOperationException
 Producer createProducer()
          Creates a GLoginProducer.
 String getClientName()
           
 GLoginComponent getComponent()
          Returns the component instance that created this endpoint.
 int getDevPort()
          Returns the port for connecting to a development server.
 String getHostName()
          Returns the internet hostname of the GAE application where to login.
 OutboundBinding<GLoginEndpoint,GLoginData,GLoginData> getOutboundBinding()
           
 String getPassword()
           
 GLoginService getService()
           
 String getUserName()
           
 boolean isDevAdmin()
           
 boolean isDevMode()
           
 boolean isSingleton()
          Returns true.
 void setClientName(String clientName)
          Sets the client name used for authentication.
 void setDevAdmin(boolean devAdmin)
          Set to true for logging in as admin to a development server.
 void setDevMode(boolean devMode)
          Set to true for connecting to a development server.
 void setOutboundBinding(OutboundBinding<GLoginEndpoint,GLoginData,GLoginData> outboundBinding)
          Sets the outbound binding for glogin endpoints.
 void setPassword(String password)
          Sets the login password.
 void setService(GLoginService service)
          Sets the service that makes the remote calls to Google services or the local development server.
 void setUserName(String userName)
          Sets the login username (a Google mail address).
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureProperties, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, getId, hashCode, isLenientProperties, isSynchronous, sanitizeUri, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GLoginEndpoint

public GLoginEndpoint(String endpointUri,
                      Component component,
                      String hostName,
                      int devPort)
Creates a new GLoginEndpoint.

Parameters:
endpointUri -
component - component that created this endpoint.
hostName - internet hostname of a GAE application, for example example.appspot.com, or localhost if the application is running on a local development server.
devPort - port for connecting to the local development server.
Method Detail

getComponent

public GLoginComponent getComponent()
Returns the component instance that created this endpoint.

Overrides:
getComponent in class DefaultEndpoint

getHostName

public String getHostName()
Returns the internet hostname of the GAE application where to login.


getOutboundBinding

public OutboundBinding<GLoginEndpoint,GLoginData,GLoginData> getOutboundBinding()

setOutboundBinding

public void setOutboundBinding(OutboundBinding<GLoginEndpoint,GLoginData,GLoginData> outboundBinding)
Sets the outbound binding for glogin endpoints. Default binding is GLoginBinding.


getClientName

public String getClientName()

setClientName

public void setClientName(String clientName)
Sets the client name used for authentication. The default name is apache-camel-2.x.

Parameters:
clientName -

getUserName

public String getUserName()

setUserName

public void setUserName(String userName)
Sets the login username (a Google mail address).

Parameters:
userName -

getPassword

public String getPassword()

setPassword

public void setPassword(String password)
Sets the login password.

Parameters:
password -

getDevPort

public int getDevPort()
Returns the port for connecting to a development server. Only used if devMode is true. Default is 8080.


isDevAdmin

public boolean isDevAdmin()

setDevAdmin

public void setDevAdmin(boolean devAdmin)
Set to true for logging in as admin to a development server. Only used if devMode is true. Default is false.

Parameters:
devAdmin -

isDevMode

public boolean isDevMode()

setDevMode

public void setDevMode(boolean devMode)
Set to true for connecting to a development server.

Parameters:
devMode -

getService

public GLoginService getService()

setService

public void setService(GLoginService service)
Sets the service that makes the remote calls to Google services or the local development server. Testing code should inject a mock service here (using serviceRef in endpoint URI).

Parameters:
service -

createProducer

public Producer createProducer()
                        throws Exception
Creates a GLoginProducer.

Throws:
Exception

createConsumer

public Consumer createConsumer(Processor processor)
                        throws Exception
throws UnsupportedOperationException

Throws:
Exception

isSingleton

public boolean isSingleton()
Returns true.



Apache CAMEL