Class DefaultIoSessionDataStructureFactory
java.lang.Object
org.apache.mina.core.session.DefaultIoSessionDataStructureFactory
- All Implemented Interfaces:
IoSessionDataStructureFactory
public class DefaultIoSessionDataStructureFactory
extends Object
implements IoSessionDataStructureFactory
The default
IoSessionDataStructureFactory implementation
that creates a new HashMap-based IoSessionAttributeMap
instance and a new synchronized ConcurrentLinkedQueue instance per
IoSession.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttributeMap(IoSession session) getWriteRequestQueue(IoSession session)
-
Constructor Details
-
DefaultIoSessionDataStructureFactory
public DefaultIoSessionDataStructureFactory()
-
-
Method Details
-
getAttributeMap
- 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
- 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
-