Skip to main content
Participant
December 7, 2014
Question

Help in translating JAVA code into CF

  • December 7, 2014
  • 0 replies
  • 269 views

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.

    This topic has been closed for replies.