javapns.communication
Interface AppleServer

All Known Subinterfaces:
AppleFeedbackServer, AppleNotificationServer
All Known Implementing Classes:
AppleFeedbackServerBasicImpl, AppleNotificationServerBasicImpl, AppleServerBasicImpl

public interface AppleServer

Common interface of all classes representing a connection to any Apple server. Use AppleNotificationServer and AppleFeedbackServer interfaces for specific connections.

Author:
Sylvain Pedneault

Method Summary
 String getKeystorePassword()
          Returns the keystore's password.
 InputStream getKeystoreStream()
          Returns a stream to a keystore.
 String getKeystoreType()
          Returns the format used to produce the keystore (typically PKCS12).
 String getProxyAuthorization()
          Get the proxy authorization (if any) currently configured for this specific server.
 String getProxyHost()
          Get the proxy host address currently configured for this specific server.
 int getProxyPort()
          Get the proxy port currently configured for this specific server.
 void setProxy(String proxyHost, int proxyPort)
          Configure a proxy to use for this specific server.
 void setProxyAuthorization(String proxyAuthorization)
          Configure the proxy authorization to use for this specific server.
 

Method Detail

getKeystoreStream

InputStream getKeystoreStream()
                              throws InvalidKeystoreReferenceException
Returns a stream to a keystore.

Returns:
an InputStream
Throws:
InvalidKeystoreReferenceException

getKeystorePassword

String getKeystorePassword()
Returns the keystore's password.

Returns:
a password matching the keystore

getKeystoreType

String getKeystoreType()
Returns the format used to produce the keystore (typically PKCS12).

Returns:
a valid keystore format identifier

getProxyHost

String getProxyHost()
Get the proxy host address currently configured for this specific server. A proxy might still be configured at the library or JVM levels. Refer to ProxyManager for more information.

Returns:
a proxy host, or null if none is configured

getProxyPort

int getProxyPort()
Get the proxy port currently configured for this specific server. A proxy might still be configured at the library or JVM levels. Refer to ProxyManager for more information.

Returns:
a network port, or 0 if no proxy is configured

setProxy

void setProxy(String proxyHost,
              int proxyPort)
Configure a proxy to use for this specific server. Use ProxyManager to configure a proxy for the entire library instead.

Parameters:
proxyHost - proxy host address
proxyPort - proxy host port

getProxyAuthorization

String getProxyAuthorization()
Get the proxy authorization (if any) currently configured for this specific server. A proxy might still be configured at the library or JVM levels. Refer to ProxyManager for more information.

Returns:
a proxy authorization, or null if none is configured

setProxyAuthorization

void setProxyAuthorization(String proxyAuthorization)
Configure the proxy authorization to use for this specific server. Use ProxyManager to configure a proxy for the entire library instead.

Parameters:
proxyAuthorization - encoded proxy authorization