private static <T> T getAPI(final Class<T> clazz) throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException { final ServerAPI serverAPI = getServerAPI(); final ClientInterceptor sessionInterceptor = new ClientInterceptor(clazz.getName(), serverAPI); return (T) Proxy.newProxyInstance(APIAccessor.class.getClassLoader(), new Class[] { clazz }, sessionInterceptor); }
private static <T> T getAPI(final Class<T> clazz) throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException { final ServerAPI serverAPI = getServerAPI(); final ClientInterceptor sessionInterceptor = new ClientInterceptor(clazz.getName(), serverAPI); return (T) Proxy.newProxyInstance(APIAccessor.class.getClassLoader(), new Class[] { clazz }, sessionInterceptor); }
private static <T> T getAPI(final Class<T> clazz, final APISession session) throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException { final ServerAPI serverAPI = getServerAPI(); final ClientInterceptor sessionInterceptor = new ClientInterceptor(clazz.getName(), serverAPI, session); return (T) Proxy.newProxyInstance(APIAccessor.class.getClassLoader(), new Class[] { clazz }, sessionInterceptor); }
private static <T> T getAPI(final Class<T> clazz, final APISession session) throws BonitaHomeNotSetException, ServerAPIException, UnknownAPITypeException { final ServerAPI serverAPI = getServerAPI(); final ClientInterceptor sessionInterceptor = new ClientInterceptor(clazz.getName(), serverAPI, session); return (T) Proxy.newProxyInstance(APIAccessor.class.getClassLoader(), new Class[] { clazz }, sessionInterceptor); }