public class JsonContainerConfigLoader extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTEXT_ROOT |
static char |
FILE_SEPARATOR |
static String |
SERVER_HOST |
static String |
SERVER_PORT |
| Modifier and Type | Method and Description |
|---|---|
static ContainerConfig.Transaction |
addToTransactionFromFile(String containers,
String host,
String port,
String contextRoot,
ContainerConfig.Transaction transaction)
Appends the contents of one or more files or resources to an transaction.
|
static ContainerConfig.Transaction |
getTransactionFromFile(String containers,
String host,
String port,
String contextRoot,
ContainerConfig containerConfig)
Creates a transaction to append the contents of one or more files or
resources to an existing configuration.
|
static Map<String,Object> |
parseJsonContainer(JSONObject json)
Parses a container in JSON notation.
|
static Map<String,Object> |
parseJsonContainer(String json)
Parses a container in JSON notation.
|
public static final char FILE_SEPARATOR
public static final String SERVER_PORT
public static final String SERVER_HOST
public static final String CONTEXT_ROOT
public static ContainerConfig.Transaction getTransactionFromFile(String containers, String host, String port, String contextRoot, ContainerConfig containerConfig) throws ContainerConfigException
containers - The comma-separated list of files or resources to load
the container configurations from.host - The hostname where Shindig is running.port - The port number where Shindig is receiving requests.contextRoot - contextRoot where Shindig module is deployedcontainerConfig - The container configuration to add the contents of
the file to.ContainerConfigException - If there was a problem reading the files.public static ContainerConfig.Transaction addToTransactionFromFile(String containers, String host, String port, String contextRoot, ContainerConfig.Transaction transaction) throws ContainerConfigException
containers - The comma-separated list of files or resources to load
the container configurations from.host - The hostname where Shindig is running.port - The port number where Shindig is receiving requests.transaction - The transaction to add the contents of the file to.ContainerConfigException - If there was a problem reading the files.public static Map<String,Object> parseJsonContainer(JSONObject json)
json - The container configuration in JSON notation.public static Map<String,Object> parseJsonContainer(String json) throws JSONException
json - The container configuration in JSON notation.JSONException - If there was a problem parsing the container.Copyright © 2007-2014 The Apache Software Foundation. All Rights Reserved.