[ http://issues.apache.org/jira/browse/DIRMINA-210?page=comments#action_12377745 ]
Niklas Therning commented on DIRMINA-210: ----------------------------------------- One way would be to let the user set an allocator on the IoServiceConfig used when binding and connecting. Acceptor/Connector/SocketIoProcessor would then use this allocator whenever allocating a buffer instead of using the static methods. The allocator could be propagated to the IoSessionConfig of new sessions to make it easily retrievable by user code whenever a session is available (e.g. in the IoHandler). Using this approach MINA internals would always use the allocator set by the user. Different allocators could be used for different server ports. It would be trivial to specify an allocator using Spring. And the user could easily get a hold of the configured allocator whenever a session is at hand. WDYT? > Investigate removal of static methods in ByteBuffer > --------------------------------------------------- > > Key: DIRMINA-210 > URL: http://issues.apache.org/jira/browse/DIRMINA-210 > Project: Directory MINA > Type: Improvement > Reporter: peter royal > Assignee: peter royal > > The removal of the static methods in ByteBuffer should be investigated. > Since the ByteBufferAllocator exists, that interface could be used directly. > For backwards compatibility ( and simple cases ), the static methods could be > retained and use a supplied instance. > Potentially, the MINA internals could all access buffers via the allocator, > leaving only user-code to use the optional static methods (after statically > supplying the allocator). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
