public class ApnsConnectionConfiguration extends Object
ApnsConnection
.Constructor and Description |
---|
ApnsConnectionConfiguration()
Creates a new connection configuration object with all options set to their default values.
|
ApnsConnectionConfiguration(ApnsConnectionConfiguration configuration)
Creates a new connection configuration object with all options set to the values in the given connection
configuration object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Integer |
getCloseAfterInactivityTime()
Returns the time, in seconds, between the sending of the last push notification and connection closure.
|
Integer |
getGracefulShutdownTimeout()
Returns the time, in seconds, after which a graceful shutdown attempt should be abandoned and the connection
should be closed immediately.
|
Integer |
getSendAttemptLimit()
Returns the number of notifications a connection may attempt to send before shutting down.
|
int |
getSentNotificationBufferCapacity()
Returns the sent notification buffer capacity for connections created with this configuration.
|
int |
hashCode() |
void |
setCloseAfterInactivityTime(Integer closeAfterInactivityTime)
Sets the time, in seconds, between the sending of the last push notification and connection closure.
|
void |
setGracefulShutdownTimeout(Integer gracefulShutdownTimeout)
Sets the time, in seconds, after which a graceful shutdown attempt should be abandoned and the connection should
be closed immediately.
|
void |
setSendAttemptLimit(Integer sendAttemptLimit)
Sets the number of notifications a connection may attempt to send before shutting down.
|
void |
setSentNotificationBufferCapacity(int sentNotificationBufferCapacity)
Sets the sent notification buffer capacity for connections created with this configuration.
|
public ApnsConnectionConfiguration()
public ApnsConnectionConfiguration(ApnsConnectionConfiguration configuration)
configuration
- the configuration object to copypublic int getSentNotificationBufferCapacity()
public void setSentNotificationBufferCapacity(int sentNotificationBufferCapacity)
sentNotificationBufferCapacity
- the sent notification buffer capacity for connections created with this
configurationpublic Integer getCloseAfterInactivityTime()
null
, connections created with this configuration will never be closed due to inactivity.public void setCloseAfterInactivityTime(Integer closeAfterInactivityTime)
null
(the default), connections will never be closed due to inactivity.closeAfterInactivityTime
- the time, in seconds, between the sending of the last push notification and
connection closurepublic Integer getGracefulShutdownTimeout()
public void setGracefulShutdownTimeout(Integer gracefulShutdownTimeout)
null
(the default) graceful shutdown attempts will never time out. Note that,
if a graceful shutdown attempt times out, no guarantees are made as to the state of notifications sent by the
connection.gracefulShutdownTimeout
- the time, in seconds, after which a graceful shutdown attempt should be abandonedpublic Integer getSendAttemptLimit()
null
if no
limit has been setpublic void setSendAttemptLimit(Integer sendAttemptLimit)
Sets the number of notifications a connection may attempt to send before shutting down. If not null
,
connections will attempt to shut down gracefully after the given number of send attempts regardless of whether
those attempts were actually successful. By default, no limit is set.
If the a send attempt limit is set and is less than the sent notification buffer size, it is guaranteed that notifications will never be lost due to buffer overruns (though they may be lost by other means, such as non- graceful shutdowns).
sendAttemptLimit
- the number of notifications the connection may attempt to send before shutting down
gracefully; if null
, no limit is setsetSentNotificationBufferCapacity(int)
Copyright © 2013–2015 RelayRides. All rights reserved.