|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.caleigo.security.LoginService
| Nested Class Summary | |
protected static class |
LoginService.LoginProxyService
|
protected class |
LoginService.LoginServiceMessageConsumer
|
| Nested classes inherited from class org.caleigo.security.ILoginService |
ILoginService.LoginMessage, ILoginService.LoginServiceReturnMessage, ILoginService.LogoutMessage, ILoginService.UserLoginInfo |
| Field Summary | |
protected java.util.HashMap |
mLoginHandlers
|
protected ILoginInfoProvider |
mLoginInfoProvider
|
protected IMessageConsumer |
mMessageConsumer
|
protected java.lang.Object |
mServiceIdentity
|
| Constructor Summary | |
LoginService(java.lang.Object serviceIdentity)
|
|
| Method Summary | |
void |
addLoginHandler(java.lang.Class loginInfoClass,
ILoginHandler loginHandler)
Add a login handler to the loginInfo class. |
void |
finalizeService()
This method is always called by the ServiceManager before the service is released. |
IProxyService |
getCustomProxyService(ITunnel tunnel)
Returns an IProxyService that is responsible for handling remote invokations of this service. |
int |
getMaximumNumberOfLoginTries()
Returns the maximum number of times a user is allowed to try to login before the application exits. |
java.lang.Object |
getServiceIdentity()
Returns the URI defining the a unique individual service. |
java.lang.Object |
getServiceInterface()
Returns the service object that this service provides. |
java.lang.Class |
getServiceInterfaceClass()
Returns the class object the defines the service interface that all services with the same type provides. |
java.lang.Object |
getServiceType()
Returns a URI that defines the type of this service. |
void |
handleError(java.lang.String message)
|
boolean |
hasCustomProxyService()
If this method returns true then the method getCustomProxyService must not return null. |
void |
initializeService()
This method is always called by the ServiceManager before any other method in the service is called. |
UserInfo |
login()
Tries to log in a user without supplying any login information. |
UserInfo |
login(java.lang.Object loginInfo)
This method takes login information supplied in the loginInfo object. |
UserInfo |
login(java.lang.String username,
java.lang.String password)
This is a helper method that logs in a user based on the supplied username-password pair. |
boolean |
logout(UserInfo userInfo)
|
boolean |
ping()
Should return true if the service is online and reponding to calls. |
void |
removeLoginHandler(java.lang.Class loginInfoClass)
Removes a login handler |
void |
setLoginInfoProvider(ILoginInfoProvider provider)
Registers an ILoginInfoProvider to use to provide login information to the login() method. |
void |
updateUserInfo(UserInfo userInfo)
Updates an UserInfo object that represents an allready logged in user with relevante user information. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.Object mServiceIdentity
protected transient IMessageConsumer mMessageConsumer
protected ILoginInfoProvider mLoginInfoProvider
protected transient java.util.HashMap mLoginHandlers
| Constructor Detail |
public LoginService(java.lang.Object serviceIdentity)
| Method Detail |
public void setLoginInfoProvider(ILoginInfoProvider provider)
ILoginService
setLoginInfoProvider in interface ILoginService
public void addLoginHandler(java.lang.Class loginInfoClass,
ILoginHandler loginHandler)
ILoginService
addLoginHandler in interface ILoginServicepublic void removeLoginHandler(java.lang.Class loginInfoClass)
ILoginService
removeLoginHandler in interface ILoginServicepublic UserInfo login()
null
if the login was canceled.
login in interface ILoginServicepublic UserInfo login(java.lang.Object loginInfo)
null
if the login was canceled.
login in interface ILoginService
public UserInfo login(java.lang.String username,
java.lang.String password)
null
if the login was canceled.
login in interface ILoginServicepublic boolean logout(UserInfo userInfo)
logout in interface ILoginServicepublic void updateUserInfo(UserInfo userInfo)
updateUserInfo in interface ILoginServicepublic void handleError(java.lang.String message)
handleError in interface ILoginServicepublic int getMaximumNumberOfLoginTries()
getMaximumNumberOfLoginTries in interface ILoginServicepublic void initializeService()
initializeService in interface IServicepublic void finalizeService()
finalizeService in interface IServicepublic boolean ping()
ping in interface IServicepublic java.lang.Object getServiceInterface()
getServiceInterface in interface IServicepublic java.lang.Class getServiceInterfaceClass()
getServiceInterfaceClass in interface IServicepublic java.lang.Object getServiceType()
getServiceType in interface IServicepublic java.lang.Object getServiceIdentity()
getServiceIdentity in interface IServicepublic boolean hasCustomProxyService()
null.
hasCustomProxyService in interface IServicepublic IProxyService getCustomProxyService(ITunnel tunnel)
getCustomProxyService in interface IService
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||