ServerAPI getServerAPI() throws ServerAPIException, UnknownAPITypeException { try { final ApiAccessType apiType = APITypeManager.getAPIType(); Map<String, String> parameters; switch (apiType) { case LOCAL: return LocalServerAPIFactory.getServerAPI(); case EJB3: parameters = APITypeManager.getAPITypeParameters(); return new EJB3ServerAPI(parameters); case HTTP: parameters = APITypeManager.getAPITypeParameters(); return new HTTPServerAPI(parameters); case TCP: parameters = APITypeManager.getAPITypeParameters(); return new TCPServerAPI(parameters); default: throw new UnknownAPITypeException("Unsupported API Type: " + apiType); } } catch (IOException e) { throw new ServerAPIException(e); } }
static ServerAPI getServerAPI() throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException { try { final ApiAccessType apiType = APITypeManager.getAPIType(); Map<String, String> parameters; switch (apiType) { case LOCAL: return LocalServerAPIFactory.getServerAPI(); case EJB3: parameters = APITypeManager.getAPITypeParameters(); return new EJB3ServerAPI(parameters); case HTTP: parameters = APITypeManager.getAPITypeParameters(); return new HTTPServerAPI(parameters); case TCP: parameters = APITypeManager.getAPITypeParameters(); return new TCPServerAPI(parameters); default: throw new UnknownAPITypeException("Unsupported API Type: " + apiType); } } catch (IOException e) { throw new ServerAPIException(e); } }
ServerAPI getServerAPI() throws ServerAPIException, UnknownAPITypeException { try { final ApiAccessType apiType = APITypeManager.getAPIType(); Map<String, String> parameters; switch (apiType) { case LOCAL: return LocalServerAPIFactory.getServerAPI(); case EJB3: parameters = APITypeManager.getAPITypeParameters(); return new EJB3ServerAPI(parameters); case HTTP: parameters = APITypeManager.getAPITypeParameters(); return new HTTPServerAPI(parameters); case TCP: parameters = APITypeManager.getAPITypeParameters(); return new TCPServerAPI(parameters); default: throw new UnknownAPITypeException("Unsupported API Type: " + apiType); } } catch (IOException e) { throw new ServerAPIException(e); } }
static ServerAPI getServerAPI() throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException { try { final ApiAccessType apiType = APITypeManager.getAPIType(); Map<String, String> parameters; switch (apiType) { case LOCAL: return LocalServerAPIFactory.getServerAPI(); case EJB3: parameters = APITypeManager.getAPITypeParameters(); return new EJB3ServerAPI(parameters); case HTTP: parameters = APITypeManager.getAPITypeParameters(); return new HTTPServerAPI(parameters); case TCP: parameters = APITypeManager.getAPITypeParameters(); return new TCPServerAPI(parameters); default: throw new UnknownAPITypeException("Unsupported API Type: " + apiType); } } catch (IOException e) { throw new ServerAPIException(e); } }