public class PortalContextUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addSocketChannelAsActive(java.nio.channels.SocketChannel sc,
PortalContext pc)
adds the socket channel to the map
|
static PortalContextUtil |
getInstance() |
PortalContext |
getRelatedPortalContext(java.nio.channels.SocketChannel sc)
read the map to get related portal context object
|
boolean |
isAnySocketChannelActive()
check if any of the socket channel has been mapped to the portal context
object.
|
PortalContext |
removeActiveSocketChannel(java.nio.channels.SocketChannel sc)
remove the socket channel from the map
|
void |
removeStaleChannel(PortalContext pc)
removed the stale socket channel object
|
public static PortalContextUtil getInstance()
public final void addSocketChannelAsActive(java.nio.channels.SocketChannel sc, PortalContext pc)
sc
- socket channel objectpc
- portal context objectpublic final PortalContext removeActiveSocketChannel(java.nio.channels.SocketChannel sc)
sc
- socket channel objectpublic final void removeStaleChannel(PortalContext pc)
pc
- portal contextpublic final boolean isAnySocketChannelActive()
public PortalContext getRelatedPortalContext(java.nio.channels.SocketChannel sc)
sc
- socket channel object