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 TypeMethodDescriptionvoid
Add login listener.ci()
Return the current ClientInfo object.encryptPassword
(String pwd) Encrypts the given password.Get encryption passwords.int
Number of re-logins are counted by this value.Get session options.long
Ticket is valid until this time.boolean
Returns true, if the specified error is a session timeout error.ix()
Get Indexserver interface.void
login()
Performs the login.lr()
Return the current LoginResult object.protected SessionOptions
Make Indexserver API object from java.util.Propertiesint
reloginOrThrow
(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:IXConnLogin
Return the current ClientInfo object.- Overrides:
ci
in classIXConnLogin
- Returns:
- ClientInfo object
-
lr
Description copied from class:IXConnLogin
Return the current LoginResult object.- Overrides:
lr
in classIXConnLogin
- Returns:
- LoginResult object
-
ix
Description copied from class:IXConnLogin
Get Indexserver interface.- Overrides:
ix
in classIXConnLogin
- Returns:
- Indexserver object
-
getLoginCount
public int getLoginCount()Description copied from class:IXConnLogin
Number of re-logins are counted by this value.- Overrides:
getLoginCount
in classIXConnLogin
- Returns:
- Number of re-logins
-
getSessionOptions
Description copied from class:IXConnLogin
Get session options.- Overrides:
getSessionOptions
in classIXConnLogin
- Returns:
- Session options
-
getEncrPasswords
Description copied from class:IXConnLogin
Get encryption passwords.- Overrides:
getEncrPasswords
in classIXConnLogin
- Returns:
- Encryption passwords
-
isReloginError
Description copied from class:IXConnLogin
Returns true, if the specified error is a session timeout error.- Overrides:
isReloginError
in 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:IXConnLogin
Checks wether the given error is a session timeout. In this case the login function is called. Otherwise the exeption is thrown.- Overrides:
reloginOrThrow
in 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:IXConnLogin
Make Indexserver API object from java.util.Properties- Overrides:
makeSessOptsObj
in classIXConnLogin
- Returns:
- Session options
-
getTicketBestBefore
public long getTicketBestBefore()Description copied from class:IXConnLogin
Ticket is valid until this time.- Overrides:
getTicketBestBefore
in classIXConnLogin
- Returns:
- System milliseconds when the ticket expires
-
addLoginListener
Description copied from class:IXConnLogin
Add 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:
addLoginListener
in classIXConnLogin
- Parameters:
cb
- Callback object
-
login
public void login() throws byps.RemoteExceptionDescription copied from class:IXConnLogin
Performs the login. To be implemented by subclass.- Specified by:
login
in classIXConnLogin
- Throws:
byps.RemoteException
- Exception with message text of format "[ELOIX:number] text".
-
encryptPassword
Description copied from class:IXConnLogin
Encrypts the given password.- Specified by:
encryptPassword
in classIXConnLogin
- Parameters:
pwd
- Plain text password.- Returns:
- Encrypted password.
- Throws:
byps.RemoteException
- Exception with message text of format "[ELOIX:number] text".
-