9123 );
NodeData nodeData = new NodeData();
// setup Server
SocketAcceptor acceptor = new NioSocketAcceptor();
acceptor.setHandler( new MinaIoHandler( SystemEventListenerFactory.getSystemEventListener(),
new GenericMessageHandlerImpl( nodeData,
SystemEventListenerFactory.getSystemEventListener() ) ) );
this.server = new MinaAcceptor( acceptor,
address );
this.server.start();
connection.addDirectoryNode(new DirectoryNodeLocalImpl());
// setup Client
NioSocketConnector clientConnector = new NioSocketConnector();
clientConnector.setHandler( new MinaIoHandler( SystemEventListenerFactory.getSystemEventListener() ) );
GenericNodeConnector minaClient = new MinaNodeConnector( "client 1",
clientConnector,
address,
SystemEventListenerFactory.getSystemEventListener() );
connection.addNodeConnector(minaClient);