Package eu.mosaic_cloud.tools.callbacks.core

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


   
    this.transcript.traceDebugging("Flusing file with extra `%{object}`" , extra);
    final CallbackCompletion<Void> completion = this.file.flush();
   
    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("opening file with path `%s` with extra `%{object}` " , path, extra);
    final CallbackCompletion<? extends eu.mosaic_cloud.connectors.dfs.IDfsFileConnector> completion = this.connector.openFile(path, mode);
   
    final DeferredFuture<GenericDfsFileConnector<TFileContext, TFileExtra>> future = (DeferredFuture) DeferredFuture.create (GenericDfsFileConnector.class);
   
    completion.observe(new CallbackCompletionObserver() {
     
      @Override
      public CallbackCompletion<Void> completed(CallbackCompletion<?> completion_) {
        assert (completion == completion_);
       
View Full Code Here

  @Override
  public CallbackCompletion<Void> respond (final HttpgResponseMessage<TResponseBody> response, final TExtra extra)
  {
    final CallbackCompletion<Void> completion = this.connector.respond (response);
    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

      completion = this.connector.destroy ();
    } else {
      completion = CallbackCompletion.createOutcome ();
    }
    if (this.callback != null) {
      completion.observe (new CallbackCompletionObserver () {
        @Override
        public CallbackCompletion<Void> completed (final CallbackCompletion<?> completion_)
        {
          assert (completion_ == completion);
          if (completion.getException () != null) {
View Full Code Here

      completion = this.connector.initialize ();
    } else {
      completion = CallbackCompletion.createOutcome ();
    }
    if (this.callback != null) {
      completion.observe (new CallbackCompletionObserver () {
        @Override
        public CallbackCompletion<Void> completed (final CallbackCompletion<?> completion_)
        {
          assert (completion_ == completion);
          if (completion.getException () != null) {
View Full Code Here

  public CallbackCompletion<Void> delete (final String key, final TExtra extra)
  {
    this.transcript.traceDebugging ("deleting the record with key `%s` and extra `%{object}`...", key, extra);
    final CallbackCompletion<Void> completion = this.connector.delete (key);
    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

  public CallbackCompletion<TValue> get (final String key, final TExtra extra)
  {
    this.transcript.traceDebugging ("getting the record with key `%s` and extra `%{object}`...", key, extra);
    final CallbackCompletion<TValue> completion = this.connector.get (key);
    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

  public CallbackCompletion<List<String>> list (final TExtra extra)
  {
    this.transcript.traceDebugging ("listing the record keys with extra `%{object}`...", extra);
    final CallbackCompletion<List<String>> completion = this.connector.list ();
    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

  public CallbackCompletion<Void> set (final String key, final TValue value, final TExtra extra)
  {
    this.transcript.traceDebugging ("setting the record with key `%s` and extra `%{object}`...", key, extra);
    final CallbackCompletion<Void> completion = this.connector.set (key, value);
    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

  public final CallbackCompletion<ComponentResourceDescriptor> acquire (final ComponentResourceSpecification resource, final TExtra extra)
  {
    this.transcript.traceDebugging ("acquiring the resource `%s`...", resource.identifier);
    final CallbackCompletion<ComponentResourceDescriptor> completion = this.connector.acquire (resource);
    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.