@ServiceProvider public class ConsoleLoginHandlerFactory extends Object implements QDLoginHandlerFactory
Constructor and Description |
---|
ConsoleLoginHandlerFactory() |
Modifier and Type | Method and Description |
---|---|
QDLoginHandler |
createLoginHandler(String login,
MessageAdapterConnectionFactory factory)
Creates login handler.
|
public static final String NAME
public QDLoginHandler createLoginHandler(String login, MessageAdapterConnectionFactory factory) throws com.devexperts.util.InvalidFormatException
QDLoginHandlerFactory
<host>:<port>[login=<params>]
this method
will be invoked with login parameters of <params>
. Params shall include
some scheme prefix that is recognized by this login handler. For example,
"MDDLoginHandlerFactory" will only create login handler for param string
"mdd" or param strings starting with "mdd:". This way, multiple login handler
factories can peacefully coexist and be used in a single JVM.
Note, that this method can read other config params from the .
For example, the implementation may understand an address like
<host>:<port>[login=mdd,user=xxx,password=yyy]
, reading user and password
from the config, instead of asking it on the command line.
createLoginHandler
in interface QDLoginHandlerFactory
login
- Additional parameters for configuration of this login handler.factory
- Parent message adapter factory.null
if the specified login parameters are not supported.com.devexperts.util.InvalidFormatException
- if login
parameters start with an appropriate prefix
but have invalid syntax.Copyright © 2002–2025 Devexperts LLC. All rights reserved.