I am trying to use org.apache.mina.core.service.SimpleIoProcessorPool which takes IoProcessor type as argument like this.
SimpleIoProcessorPool<NioSession> pool =
new SimpleIoProcessorPool<NioSession>(NioProcessor.cla ss);
I don't know how to provide constructor arg for this class in my application context file. If I give class name as value, it is a String and is wrong.
<bean id="simpleIoProcessorPool" class="org.apache.mina.core.service.SimpleIoProces sorPool">
<constructor-arg value="NioProcessor.class"/>
</bean>
At the same time, if I give ref="nioprocessor" and define bean id with Executor service like below [ except I did not provide Executor in constructor arg to keep it short], then it is injecting the new instance of NioProcessor which is not what I want.
<bean id="simpleIoProcessorPool" class="org.apache.mina.core.service.SimpleIoProces sorPool">
<constructor-arg ref="nioProcessor"/>
</bean>
<bean id="nioProcessor" class="org.apache.mina.transport.socket.nio.NioPro cessor">
<constructor-arg></constructor-arg>
</bean>
thank you,


Reply With Quote