use of com.notnoop.apns.utils.ApnsServerStub in project camel by apache.
the class ApnsUtils method prepareAndStartServer.
public static ApnsServerStub prepareAndStartServer(int gatePort, int feedPort) {
InputStream stream = ClassLoader.getSystemResourceAsStream(FixedCertificates.SERVER_STORE);
SSLContext context = Utilities.newSSLContext(stream, FixedCertificates.SERVER_PASSWORD, "PKCS12", getAlgorithm());
ApnsServerStub server = new ApnsServerStub(context.getServerSocketFactory(), gatePort, feedPort);
server.start();
return server;
}
Aggregations