public class AndroidRelayServerConfig extends RelayServerConfig
| Modifier and Type | Field and Description |
|---|---|
protected IGCMSender |
gcmSender |
| Constructor and Description |
|---|
AndroidRelayServerConfig(MessageBufferConfiguration bufferConfig)
Creates an Android relay server config that is not able to send GCM messages itself.
|
AndroidRelayServerConfig(String gcmAuthenticationKey,
int gcmRetries,
MessageBufferConfiguration bufferConfig)
Creates an Android relay server configuration that is able to send GCM messages itself
|
| Modifier and Type | Method and Description |
|---|---|
BaseRelayServer |
createServer(net.tomp2p.message.Message message,
net.tomp2p.connection.PeerConnection peerConnection,
net.tomp2p.connection.Responder responder,
net.tomp2p.p2p.Peer peer) |
void |
start(net.tomp2p.p2p.Peer peer) |
createResponseprotected IGCMSender gcmSender
public AndroidRelayServerConfig(String gcmAuthenticationKey, int gcmRetries, MessageBufferConfiguration bufferConfig)
gcmAuthenticationKey - the api key / authentication token for Google Cloud Messaging. The key
can be obtained through Google's developer console. The key should be kept secret.gcmRetries - how many times the GCM message should be resent before giving up. Normal ranges are 1-5bufferConfig - the buffer behavior before sending a GCM message to the Android devicepublic AndroidRelayServerConfig(MessageBufferConfiguration bufferConfig)
bufferConfig - the buffer behavior before sending a GCM message to the Android device (over a
RemoteGCMSender).public void start(net.tomp2p.p2p.Peer peer)
start in class RelayServerConfigpublic BaseRelayServer createServer(net.tomp2p.message.Message message, net.tomp2p.connection.PeerConnection peerConnection, net.tomp2p.connection.Responder responder, net.tomp2p.p2p.Peer peer)
createServer in class RelayServerConfigCopyright © 2015. All rights reserved.