• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Help in translating JAVA code into CF

New Here ,
Dec 06, 2014 Dec 06, 2014

Copy link to clipboard

Copied

Hi all!  I'm at the end of integrating an in-house calendar with Google calendars and all is working, however, I am stumped as to how implement callback functions.  Here's what I'm trying to do as outlined on http://code.google.com/p/google-api-java-client/source/browse/Batch.wiki?repo=wiki

What I need to do is this section right here:

JsonBatchCallback<Calendar> callback = new JsonBatchCallback<Calendar>() {
 
  public void onSuccess(Calendar calendar, HttpHeaders responseHeaders) {
    printCalendar(calendar);
    addedCalendarsUsingBatch.add(calendar);
  }

  public void onFailure(GoogleJsonError e, HttpHeaders responseHeaders) {
    System.out.println("Error Message: " + e.getMessage());
  }
};

And then later pass it to:

client.calendars().insert(entry1).queue(batch, callback);


I believe I can pass one function by passing just the name of the function, but BatchCallback has two functions.  Is this impossible to do in CF?


Thanks,

Ross.

Views

221

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation