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 defaultIoSessionDataStructureFactoryimplementation that creates a newHashMap-basedIoSessionAttributeMapinstance and a new synchronizedConcurrentLinkedQueueinstance perIoSession.- Author:
- Apache MINA Project
-
-
Constructor Summary
Constructors Constructor Description DefaultIoSessionDataStructureFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IoSessionAttributeMapgetAttributeMap(IoSession session)WriteRequestQueuegetWriteRequestQueue(IoSession session)
-
-
-
Method Detail
-
getAttributeMap
public IoSessionAttributeMap getAttributeMap(IoSession session) throws Exception
- Specified by:
getAttributeMapin interfaceIoSessionDataStructureFactory- Parameters:
session- The session for which we want the Attribute Map- Returns:
- an
IoSessionAttributeMapwhich 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:
getWriteRequestQueuein interfaceIoSessionDataStructureFactory- Parameters:
session- The session for which we want the WriteRequest queue- Returns:
- an
WriteRequestwhich 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
-
-