Search in sources :

Example 1 with ApnsServiceBuilder

use of com.notnoop.apns.ApnsServiceBuilder in project camel by apache.

the class ApnsServiceFactory method getApnsService.

public ApnsService getApnsService() {
    ApnsServiceBuilder builder = APNS.newService();
    builder = configureServiceBuilder(builder);
    configureConnectionStrategy(builder);
    configureReconnectionPolicy(builder);
    configureApnsDelegate(builder);
    configureApnsDestinations(builder);
    try {
        configureApnsCertificate(builder);
    } catch (IOException e) {
        throw ObjectHelper.wrapRuntimeCamelException(e);
    } catch (GeneralSecurityException e) {
        throw ObjectHelper.wrapRuntimeCamelException(e);
    }
    ApnsService apnsService = builder.build();
    return apnsService;
}
Also used : GeneralSecurityException(java.security.GeneralSecurityException) ApnsServiceBuilder(com.notnoop.apns.ApnsServiceBuilder) IOException(java.io.IOException) ApnsService(com.notnoop.apns.ApnsService)

Aggregations

ApnsService (com.notnoop.apns.ApnsService)1 ApnsServiceBuilder (com.notnoop.apns.ApnsServiceBuilder)1 IOException (java.io.IOException)1 GeneralSecurityException (java.security.GeneralSecurityException)1