Package eu.mosaic_cloud.tools.callbacks.core

Examples of eu.mosaic_cloud.tools.callbacks.core.CallbackCompletionObserver


  public CallbackCompletion<Void> close(final TExtra extra) {
    this.transcript.traceDebugging("Closing file with extra `%{object}`" , extra);
    final CallbackCompletion<Void> completion = this.file.close();
   
    if(this.callback != null) {
      completion.observe(new CallbackCompletionObserver() {
       
        @Override
        public CallbackCompletion<Void> completed(CallbackCompletion<?> completion_) {
          assert (completion == completion_);
         
View Full Code Here


    this.transcript.traceDebugging("deleting the file with path `%s` and extra `%{object}`"
                            , fullPath, extra);
    final CallbackCompletion<Void> completion = this.connector.removeFile(fullPath);
   
    if(this.callback != null) {
      completion.observe(new CallbackCompletionObserver() {
       
        @Override
        public CallbackCompletion<Void> completed(CallbackCompletion<?> completion_) {
          assert (completion == completion_);
         
View Full Code Here

  public CallbackCompletion<Void> removeDirectory(final String fullPath, final TExtra extra) {
    this.transcript.traceDebugging("deleting the directory with path `%s` and extra `%{object}`" , fullPath, extra);
    final CallbackCompletion<Void> completion = this.connector.removeDirectory(fullPath);
   
    if(this.callback != null) {
      completion.observe(new CallbackCompletionObserver() {
       
        @Override
        public CallbackCompletion<Void> completed(CallbackCompletion<?> completion_) {
          assert (completion == completion_);
         
View Full Code Here

  public CallbackCompletion<Void> makeDirectory(final String dirNameFullPath, final TExtra extra) {
    this.transcript.traceDebugging("making directory with path `%s` and extra `%{object}`" , dirNameFullPath, extra);
    final CallbackCompletion<Void> completion = this.connector.makeDirectory(dirNameFullPath);
   
    if(this.callback != null) {
      completion.observe(new CallbackCompletionObserver() {
       
        @Override
        public CallbackCompletion<Void> completed(CallbackCompletion<?> completion_) {
          assert (completion == completion_);
         
View Full Code Here

  public CallbackCompletion<List<LsElement>> listDirectory(final String path, final TExtra extra) {
    this.transcript.traceDebugging("list directory with path `%s` and extra `%{object}`" , path, extra);
    final CallbackCompletion<List<LsElement>> completion = this.connector.listDirectory(path);
   
    if(this.callback != null) {
      completion.observe(new CallbackCompletionObserver() {
       
        @Override
        public CallbackCompletion<Void> completed(CallbackCompletion<?> completion_) {
          assert (completion == completion_);
         
View Full Code Here

        trigger = this.outcome.compareAndSet (null, Boolean.TRUE);
      else
        trigger = this.outcome.compareAndSet (null, Boolean.FALSE);
      if (trigger) {
        while (true) {
          final CallbackCompletionObserver observer = this.observers.poll ();
          if (observer == null)
            break;
          this.triggerObserver (observer);
        }
      }
View Full Code Here

            future.trigger.triggerFailed (exception);
            return;
          } else
            return;
        }
        completion.observe (new CallbackCompletionObserver () {
          @Override
          public CallbackCompletion<Void> completed (final CallbackCompletion<?> completion_)
          {
            Preconditions.checkArgument (completion_ == completion);
            final Throwable exception = completion.getException ();
View Full Code Here

  {
    final ListenableFutureTask<TOutcome> task = ListenableFutureTask.create (callable);
    this.executor.execute (task);
    final CallbackCompletion<TOutcome> completion = CallbackCompletion.createDeferred (task);
    if (this.callback != null) {
      completion.observe (new CallbackCompletionObserver () {
        @SuppressWarnings ("synthetic-access")
        @Override
        public CallbackCompletion<Void> completed (final CallbackCompletion<?> completion_)
        {
          assert (completion_ == completion);
View Full Code Here

  @Override
  public CallbackCompletion<Void> publish (final TMessage message, final TExtra extra)
  {
    final CallbackCompletion<Void> completion = this.connector.publish (message);
    if (this.callback != null) {
      completion.observe (new CallbackCompletionObserver () {
        @SuppressWarnings ("synthetic-access")
        @Override
        public CallbackCompletion<Void> completed (final CallbackCompletion<?> completion_)
        {
          assert (completion_ == completion);
View Full Code Here

  @Override
  public CallbackCompletion<Void> acknowledge (final IAmqpMessageToken token, final TExtra extra)
  {
    final CallbackCompletion<Void> completion = this.connector.acknowledge (token);
    if (this.callback != null) {
      completion.observe (new CallbackCompletionObserver () {
        @SuppressWarnings ("synthetic-access")
        @Override
        public CallbackCompletion<Void> completed (final CallbackCompletion<?> completion_)
        {
          assert (completion_ == completion);
View Full Code Here

TOP

Related Classes of eu.mosaic_cloud.tools.callbacks.core.CallbackCompletionObserver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.