APNSDelegate not invoked for ApnsService

385 views
Skip to first unread message

Arun Chauhan

unread,
Dec 10, 2011, 9:04:48 AM12/10/11
to Java client for Apple Push Notification service (APNs)
Hi,

I am using the apns 0.5.3 plugin in grails . So it will generate the
the following class which return the ApnsService object on runtime.


package org.epseelon.grails.apns

import org.springframework.beans.factory.FactoryBean
import com.notnoop.apns.APNS
import com.notnoop.apns.ApnsService

/**
* @author sarbogast
* @version 1 janv. 2010, 00:37:38
*/
class ApnsFactoryBean implements FactoryBean {
public enum Environment{SANDBOX, PRODUCTION}

String pathToCertificate
String password
boolean queued = false
Environment environment = Environment.SANDBOX
boolean nonBlocking = false

Object getObject() {
def apnsService =
APNS.newService().withCert(pathToCertificate, password)

switch(environment){
case Environment.PRODUCTION:
apnsService = apnsService.withProductionDestination(); break;
case Environment.SANDBOX:
default:
apnsService = apnsService.withSandboxDestination(); break;
}

/*
* Apns, nowadays, is just supporting Queued service.
* Was talking to the developer of the API, and he told me that
furtermore
* even the method asNonBlocking might be removed!
*/

apnsService = apnsService.asQueued()

return apnsService.build()
}

Class getObjectType() { ApnsService }

boolean isSingleton() { true }
}


when i use ApnsService in another class then it did not show all the
method for the ApnsService.
But in ApnsFactoryBean class it shows all the methods for ApnsService.

Please tell me how i invoke all the methods for ApnsService


Mahmood Ali

unread,
Dec 13, 2011, 9:02:30 PM12/13/11
to java-apn...@googlegroups.com
Greetings,

> when i use ApnsService in another class then it did not show all the
> method for the ApnsService.
> But in ApnsFactoryBean class it shows all the methods for ApnsService.
>
> Please tell me how i invoke all the methods for ApnsService

I'm sorry but I cannot follow your question here. Can you please
clarify it? Have you contacted the apns grails-plugin maintainer?

Regards,
Mahmood

Reply all
Reply to author
Forward
0 new messages