public class ProviderManager
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
acquire()
Acquire a connection
|
DeviceToken |
addDevice(Member loggedMember,
java.lang.String deviceId,
javax.servlet.http.HttpServletRequest request)
add a device to connection map
|
void |
cleanConnections()
Clean old connections in connection map
|
java.util.concurrent.ConcurrentHashMap<java.lang.String,java.util.Set<DeviceToken>> |
getCurrentConnections() |
java.lang.Integer |
getDelayBetweenNotificationCheck() |
static ProviderManager |
getInstance() |
java.util.concurrent.atomic.AtomicInteger |
getInstanceCount() |
java.lang.Integer |
getKeepAliveDelay() |
java.lang.Integer |
getMaximumInstancePerMember() |
java.lang.Integer |
getMaximumProcessDuration() |
java.lang.Integer |
getRetryValue() |
void |
initProtocolProperties(Channel channel)
set protocol properties from channel properties, not done before because channel may not be initialized when the servlet initializes
|
boolean |
isAuthorized(java.lang.Object runningAuthorization) |
boolean |
isEnabled() |
void |
release()
Release a connection
|
void |
removeAuthorization(java.lang.Object runningAuthorization) |
public static ProviderManager getInstance()
public java.util.concurrent.ConcurrentHashMap<java.lang.String,java.util.Set<DeviceToken>> getCurrentConnections()
public void initProtocolProperties(Channel channel)
channel
- the channel instancepublic boolean isEnabled()
public java.util.concurrent.atomic.AtomicInteger getInstanceCount()
public java.lang.Integer getMaximumProcessDuration()
public java.lang.Integer getKeepAliveDelay()
public java.lang.Integer getRetryValue()
public java.lang.Integer getDelayBetweenNotificationCheck()
public java.lang.Integer getMaximumInstancePerMember()
public boolean acquire()
public void release()
public DeviceToken addDevice(Member loggedMember, java.lang.String deviceId, javax.servlet.http.HttpServletRequest request) throws TooManyDeviceException
loggedMember
- the Member
deviceId
- the deviceIdrequest
- the HttpServletRequest
used to get remote IPDeviceToken
returned if the device can be added.TooManyDeviceException
- exception thrown if maximum of existing connection (with another device id) is reachedpublic void cleanConnections()
public void removeAuthorization(java.lang.Object runningAuthorization)
public boolean isAuthorized(java.lang.Object runningAuthorization)
Copyright © 2001-2018 Jalios SA. All Rights Reserved.