public class APITypeManager
extends java.lang.Object
Use System property -Dorg.bonitasoft.engine.api-type=
connect to the server in the local JVM (default). No other configuration is necessary.
connect to the server using HTTP. You must also specify:
-Dorg.bonitasoft.engine.api-type.server.url=HTTP_SERVER_URL, e.g. http://localhost:8080-Dorg.bonitasoft.engine.api-type.application.name=WEBAPP_NAME, this is the name of the web application, e.g. bonita-Dorg.bonitasoft.engine.api-type.connections.max=CONNECTIONS_MAX
connect to the server using EJB3. You must also specify
For Wildfly 10 :
-Djava.naming.factory.url.pkgs=org.jboss.ejb.client.naming-Dorg.bonitasoft.engine.ejb.naming.reference=ejb:bonita-ear/bonita-ejb/serverAPIBean!org.bonitasoft.engine.api.internal.ServerAPInot recommended, only for testing purpose.
APITypeManager.setAPITypeAndParams(ApiAccessType.LOCAL, null);
HashMap parameters = new HashMap<>();
parameters.put("server.url", "http://myserver.com:8080");
parameters.put("application.name", "bonita-application");
parameters.put("connections.max", "5");
APITypeManager.setAPITypeAndParams(ApiAccessType.HTTP, parameters);
HashMap parameters= new HashMap<>();
parameters.put("java.naming.factory.url.pkgs", "org.jboss.ejb.client.naming");
parameters.put("org.bonitasoft.engine.ejb.naming.reference","ejb:bonita-ear/bonita-ejb/serverAPIBean!org.bonitasoft.engine.api.internal.ServerAPI");
APITypeManager.setAPITypeAndParams(ApiAccessType.EJB3, parameters);
| Constructor and Description |
|---|
APITypeManager() |
| Modifier and Type | Method and Description |
|---|---|
static ApiAccessType |
getAPIType() |
static java.util.Map<java.lang.String,java.lang.String> |
getAPITypeParameters() |
static void |
refresh() |
static void |
setAPITypeAndParams(ApiAccessType type,
java.util.Map<java.lang.String,java.lang.String> parameters) |
public static ApiAccessType getAPIType() throws org.bonitasoft.engine.exception.ServerAPIException, UnknownAPITypeException, java.io.IOException
org.bonitasoft.engine.exception.ServerAPIExceptionUnknownAPITypeExceptionjava.io.IOExceptionpublic static java.util.Map<java.lang.String,java.lang.String> getAPITypeParameters()
throws org.bonitasoft.engine.exception.ServerAPIException,
java.io.IOException
org.bonitasoft.engine.exception.ServerAPIExceptionjava.io.IOExceptionpublic static void setAPITypeAndParams(ApiAccessType type, java.util.Map<java.lang.String,java.lang.String> parameters)
public static void refresh()