Package de.elo.ix.client
Class IXConnLoginBYPS
java.lang.Object
de.elo.ix.client.IXConnLogin
de.elo.ix.client.IXConnLoginBYPS
-
Field Summary
Fields inherited from class de.elo.ix.client.IXConnLogin
callId, DEFAULT_LOOP_MAX, encrPasswords, ix, loginCallbacks, loginCount, lr, RELOGIN_ERRORS, sessOpts, ticketBestBefore -
Constructor Summary
ConstructorsConstructorDescriptionIXConnLoginBYPS(IXConnFactory connFact, IXConnection conn, Properties sessOpts, Properties encrPasswords) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd login listener.ci()Return the current ClientInfo object.encryptPassword(String pwd) Encrypts the given password.Get encryption passwords.intNumber of re-logins are counted by this value.Get session options.longTicket is valid until this time.booleanReturns true, if the specified error is a session timeout error.ix()Get Indexserver interface.voidlogin()Performs the login.lr()Return the current LoginResult object.protected SessionOptionsMake Indexserver API object from java.util.PropertiesintreloginOrThrow(int prevLoginCount, int loopCount, byps.RemoteException e) Checks wether the given error is a session timeout.
-
Constructor Details
-
IXConnLoginBYPS
public IXConnLoginBYPS(IXConnFactory connFact, IXConnection conn, Properties sessOpts, Properties encrPasswords)
-
-
Method Details
-
ci
Description copied from class:IXConnLoginReturn the current ClientInfo object.- Overrides:
ciin classIXConnLogin- Returns:
- ClientInfo object
-
lr
Description copied from class:IXConnLoginReturn the current LoginResult object.- Overrides:
lrin classIXConnLogin- Returns:
- LoginResult object
-
ix
Description copied from class:IXConnLoginGet Indexserver interface.- Overrides:
ixin classIXConnLogin- Returns:
- Indexserver object
-
getLoginCount
public int getLoginCount()Description copied from class:IXConnLoginNumber of re-logins are counted by this value.- Overrides:
getLoginCountin classIXConnLogin- Returns:
- Number of re-logins
-
getSessionOptions
Description copied from class:IXConnLoginGet session options.- Overrides:
getSessionOptionsin classIXConnLogin- Returns:
- Session options
-
getEncrPasswords
Description copied from class:IXConnLoginGet encryption passwords.- Overrides:
getEncrPasswordsin classIXConnLogin- Returns:
- Encryption passwords
-
isReloginError
Description copied from class:IXConnLoginReturns true, if the specified error is a session timeout error.- Overrides:
isReloginErrorin classIXConnLogin- Parameters:
e- Exception- Returns:
- true, if function should be retried after a re-login.
-
reloginOrThrow
public int reloginOrThrow(int prevLoginCount, int loopCount, byps.RemoteException e) throws byps.RemoteException Description copied from class:IXConnLoginChecks wether the given error is a session timeout. In this case the login function is called. Otherwise the exeption is thrown.- Overrides:
reloginOrThrowin classIXConnLogin- Parameters:
prevLoginCount- Number of login retries passed to the previous callloopCount- Number of retriese- Exception or null. If not null, the Exception is immediately fired.- Returns:
- Current number of re-logins.
- Throws:
byps.RemoteException- Exception with message text of format "[ELOIX:number] text".
-
makeSessOptsObj
Description copied from class:IXConnLoginMake Indexserver API object from java.util.Properties- Overrides:
makeSessOptsObjin classIXConnLogin- Returns:
- Session options
-
getTicketBestBefore
public long getTicketBestBefore()Description copied from class:IXConnLoginTicket is valid until this time.- Overrides:
getTicketBestBeforein classIXConnLogin- Returns:
- System milliseconds when the ticket expires
-
addLoginListener
Description copied from class:IXConnLoginAdd login listener. The interface is called, after login was successful and session options were sent. If the session expires and a re-login is performed, the interface is called again.- Overrides:
addLoginListenerin classIXConnLogin- Parameters:
cb- Callback object
-
login
public void login() throws byps.RemoteExceptionDescription copied from class:IXConnLoginPerforms the login. To be implemented by subclass.- Specified by:
loginin classIXConnLogin- Throws:
byps.RemoteException- Exception with message text of format "[ELOIX:number] text".
-
encryptPassword
Description copied from class:IXConnLoginEncrypts the given password.- Specified by:
encryptPasswordin classIXConnLogin- Parameters:
pwd- Plain text password.- Returns:
- Encrypted password.
- Throws:
byps.RemoteException- Exception with message text of format "[ELOIX:number] text".
-