Class DefaultIoSessionDataStructureFactory

    • Constructor Detail

      • DefaultIoSessionDataStructureFactory

        public DefaultIoSessionDataStructureFactory()
    • Method Detail

      • getAttributeMap

        public IoSessionAttributeMap getAttributeMap​(IoSession session)
                                              throws java.lang.Exception
        Specified by:
        getAttributeMap in interface IoSessionDataStructureFactory
        Parameters:
        session - The session for which we want the Attribute Map
        Returns:
        an IoSessionAttributeMap which is going to be associated with the specified session. Please note that the returned implementation must be thread-safe.
        Throws:
        java.lang.Exception - If an error occured while retrieving the map
      • getWriteRequestQueue

        public WriteRequestQueue getWriteRequestQueue​(IoSession session)
                                               throws java.lang.Exception
        Specified by:
        getWriteRequestQueue in interface IoSessionDataStructureFactory
        Parameters:
        session - The session for which we want the WriteRequest queue
        Returns:
        an WriteRequest which is going to be associated with the specified session. 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 involves Comparator.
        Throws:
        java.lang.Exception - If an error occured while retrieving the queue