Package com.portal.pcm
Class PortalContextUtil
java.lang.Object
com.portal.pcm.PortalContextUtil
A Utility class that maps socket channel and related portal context objects.
Used during asynchronous mode of opcode processing.
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
adds the socket channel to the mapstatic PortalContextUtil
read the map to get related portal context objectfinal boolean
check if any of the socket channel has been mapped to the portal context object.final PortalContext
remove the socket channel from the mapfinal void
removed the stale socket channel object
-
Method Details
-
getInstance
-
addSocketChannelAsActive
adds the socket channel to the map- Parameters:
sc
- socket channel objectpc
- portal context object
-
removeActiveSocketChannel
remove the socket channel from the map- Parameters:
sc
- socket channel object- Returns:
- portal context
-
removeStaleChannel
removed the stale socket channel object- Parameters:
pc
- portal context
-
isAnySocketChannelActive
public final boolean isAnySocketChannelActive()check if any of the socket channel has been mapped to the portal context object.- Returns:
- true is map is not empty
-
getRelatedPortalContext
read the map to get related portal context object- Parameters:
sc
- socket channel object- Returns:
- portal context
-