public class Config extends Object
Modifier and Type | Field and Description |
---|---|
protected static String |
CLIENT_NAMES |
protected Map<String,SessionInfo> |
clients |
protected static String |
CONNECTION_NAMES |
protected Map<String,ConnectionInfo> |
connections |
protected String |
prefix |
Constructor and Description |
---|
Config(String prefix,
InputStream streamConfigFile) |
Config(String prefix,
Properties properties) |
Config(String prefix,
String pathToConfigFile) |
Modifier and Type | Method and Description |
---|---|
ConnectionInfo |
getConnectionInfo(String connectionName) |
Set<String> |
getConnectionNames() |
protected static Properties |
getProperties(InputStream pathToConfigFile) |
Set<String> |
getSessionIDS() |
SessionInfo |
getSessionInfo(String clientName) |
protected void |
parse(Properties properties) |
protected void |
parseClient(String name,
Properties properties) |
protected void |
parseClients(Properties properties) |
protected void |
parseConnection(String name,
Properties properties) |
protected void |
parseConnections(Properties properties) |
protected Map<String,ConnectionInfo> connections
protected Map<String,SessionInfo> clients
protected String prefix
protected static final String CONNECTION_NAMES
protected static final String CLIENT_NAMES
public Config(String prefix, String pathToConfigFile) throws IOException
IOException
public Config(String prefix, InputStream streamConfigFile) throws IOException
IOException
public Config(String prefix, Properties properties) throws IOException
IOException
protected void parse(Properties properties) throws IOException
IOException
protected void parseClients(Properties properties)
protected void parseClient(String name, Properties properties)
protected void parseConnections(Properties properties)
protected static Properties getProperties(InputStream pathToConfigFile) throws IOException
IOException
protected void parseConnection(String name, Properties properties)
public ConnectionInfo getConnectionInfo(String connectionName)
public SessionInfo getSessionInfo(String clientName)
Copyright © 2000–2022 EPAM Systems. All rights reserved.