@Override public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { return delegate.get(timeout, unit); } }
@Override public T get() throws InterruptedException, ExecutionException { return delegate.get(); }
@Override public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { return delegate.get(timeout, unit); } }
@Override public void handleComplete(AsyncFuture<? extends T> asyncFuture, Object attachment) { try { callback.completed(asyncFuture.get()); } catch (Exception e) { // } }
@Override public void handleComplete(AsyncFuture<? extends T> asyncFuture, Object attachment) { try { callback.completed(asyncFuture.get()); } catch (Exception e) { // } }
@Override public void handleComplete(AsyncFuture<? extends T> asyncFuture, Object attachment) { try { callback.completed(asyncFuture.get()); } catch (Exception e) { // } }
/** * Execute for result. * * @param executionContext the execution context * @return the result * @throws IOException for any error */ private ModelNode executeForResult(final OperationExecutionContext executionContext) throws IOException { try { return execute(executionContext).get(); } catch(Exception e) { throw new IOException(e); } }
@Override public ModelNode get() throws InterruptedException, ExecutionException { return responseNodeOnly(delegate.get()); }
/** * Execute for result. * * @param executionContext the execution context * @return the result * @throws IOException for any error */ private OperationResponse executeForResult(final OperationExecutionContext executionContext) throws IOException { try { return execute(executionContext).get(); } catch(Exception e) { throw new IOException(e); } }
private OperationResponse doExecuteOperation(Operation operation, OperationMessageHandler messageHandler) throws IOException { AsyncFuture<OperationResponse> task; task = wrapped.executeOperationAsync(operation, messageHandler); setLastHandlerTask(task); try { return task.get(); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); throw new IOException(ex); } catch (ExecutionException ex) { throw new IOException(ex); } }
private OperationResponse doExecuteOperation(Operation operation, OperationMessageHandler messageHandler) throws IOException { AsyncFuture<OperationResponse> task; task = wrapped.executeOperationAsync(operation, messageHandler); setLastHandlerTask(task); try { return task.get(); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); throw new IOException(ex); } catch (ExecutionException ex) { throw new IOException(ex); } }
public File getFile(final String relativePath, final byte repoId, final File localDeploymentFolder) { try { return channelHandler.executeRequest(new GetFileRequest(relativePath, localDeploymentFolder), null).getResult().get(); } catch (Exception e) { throw ServerLogger.ROOT_LOGGER.failedToGetFileFromRemoteRepository(e); } } }
@Override @SuppressWarnings("unchecked") public AsyncFuture<ServiceContainer> startup(Configuration configuration, List<ServiceActivator> extraServices) { try { ServiceContainer container = bootstrap(configuration, extraServices).get(); ServiceController<?> controller = container.getRequiredService(Services.JBOSS_AS); return (AsyncFuture<ServiceContainer>) controller.getValue(); } catch (Exception ex) { shutdownHook.shutdown(true); throw ServerLogger.ROOT_LOGGER.cannotStartServer(ex); } }
public File getFile(final String relativePath, final byte repoId, final File localDeploymentFolder) { try { return channelHandler.executeRequest(new GetFileRequest(relativePath, localDeploymentFolder), null).getResult().get(); } catch (Exception e) { throw ServerMessages.MESSAGES.failedToGetFileFromRemoteRepository(e); } } }
public File getFile(final String relativePath, final byte repoId, final File localDeploymentFolder) { try { return channelHandler.executeRequest(new GetFileRequest(relativePath, localDeploymentFolder), null).getResult().get(); } catch (Exception e) { throw ServerLogger.ROOT_LOGGER.failedToGetFileFromRemoteRepository(e); } } }
@Override @SuppressWarnings("unchecked") public AsyncFuture<ServiceContainer> startup(Configuration configuration, List<ServiceActivator> extraServices) { try { ServiceContainer container = bootstrap(configuration, extraServices).get(); ServiceController<?> controller = container.getRequiredService(Services.JBOSS_AS); return (AsyncFuture<ServiceContainer>) controller.getValue(); } catch (Exception ex) { throw ServerMessages.MESSAGES.cannotStartServer(ex); } }
public File getFile(final String relativePath, final byte repoId, final File localDeploymentFolder) { try { return channelHandler.executeRequest(new GetFileRequest(relativePath, localDeploymentFolder), null).getResult().get(); } catch (Exception e) { throw ServerMessages.MESSAGES.failedToGetFileFromRemoteRepository(e); } } }
@Override @SuppressWarnings("unchecked") public AsyncFuture<ServiceContainer> startup(Configuration configuration, List<ServiceActivator> extraServices) { try { ServiceContainer container = bootstrap(configuration, extraServices).get(); ServiceController<?> controller = container.getRequiredService(Services.JBOSS_AS); return (AsyncFuture<ServiceContainer>) controller.getValue(); } catch (Exception ex) { throw ServerMessages.MESSAGES.cannotStartServer(ex); } }
@Override @SuppressWarnings("unchecked") public AsyncFuture<ServiceContainer> startup(Configuration configuration, List<ServiceActivator> extraServices) { try { ServiceContainer container = bootstrap(configuration, extraServices).get(); ServiceController<?> controller = container.getRequiredService(Services.JBOSS_AS); return (AsyncFuture<ServiceContainer>) controller.getValue(); } catch (Exception ex) { shutdownHook.shutdown(true); throw ServerLogger.ROOT_LOGGER.cannotStartServer(ex); } }
public File getFile(final String relativePath, final byte repoId, HostFileRepository localFileRepository) { if(connection.isConnected()) { try { return handler.executeRequest(new GetFileRequest(repoId, relativePath, localFileRepository), null).getResult().get(); } catch (Exception e) { throw MESSAGES.failedToGetFileFromRemoteRepository(e); } } else { return localFileRepository.getFile(relativePath); } } };