Package org.apache.mina.core.session
Class DefaultIoSessionDataStructureFactory
- java.lang.Object
-
- org.apache.mina.core.session.DefaultIoSessionDataStructureFactory
-
- All Implemented Interfaces:
IoSessionDataStructureFactory
public class DefaultIoSessionDataStructureFactory extends Object implements IoSessionDataStructureFactory
The defaultIoSessionDataStructureFactory
implementation that creates a newHashMap
-basedIoSessionAttributeMap
instance and a new synchronizedConcurrentLinkedQueue
instance perIoSession
.- Author:
- Apache MINA Project
-
-
Constructor Summary
Constructors Constructor Description DefaultIoSessionDataStructureFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IoSessionAttributeMap
getAttributeMap(IoSession session)
WriteRequestQueue
getWriteRequestQueue(IoSession session)
-
-
-
Method Detail
-
getAttributeMap
public IoSessionAttributeMap getAttributeMap(IoSession session) throws Exception
- Specified by:
getAttributeMap
in interfaceIoSessionDataStructureFactory
- Parameters:
session
- The session for which we want the Attribute Map- Returns:
- an
IoSessionAttributeMap
which is going to be associated with the specifiedsession
. Please note that the returned implementation must be thread-safe. - Throws:
Exception
- If an error occured while retrieving the map
-
getWriteRequestQueue
public WriteRequestQueue getWriteRequestQueue(IoSession session) throws Exception
- Specified by:
getWriteRequestQueue
in interfaceIoSessionDataStructureFactory
- Parameters:
session
- The session for which we want the WriteRequest queue- Returns:
- an
WriteRequest
which is going to be associated with the specifiedsession
. Please note that the returned implementation must be thread-safe and robust enough to deal with various messages types (even what you didn't expect at all), especially when you are going to implement a priority queue which involvesComparator
. - Throws:
Exception
- If an error occured while retrieving the queue
-
-