V.B, To me this looks similar to TLS. Can you thus not just implement a custom SocketFactory? That's usually the way how you would integrate a TLS library that doesn't support JSSE as well.
Ortwin J. D. wrote: > I am trying to use HTTP Core NIO module to build highly scalable HTTP clients > that do not directly use sockets to connect to peer HTTP servers. The network > topology involves a tunnel and hence not amenable to a direct socket to the > peer. > > [ Users <==> HttpClients <==> Tunnel(s) ] <==> [ Peer HttpServers ] > > My first thought was to simply use an instance of pair of > java.nio.channels.Pipe pipeIn, pipeOut and use these pipes to hook up with my > tunnel IO module. For outcoming (w.r.t. HttpClient) pipeOut.sink channel will > enable HttpClient to write data to my tunnel and pipeIn.source will enable > HttpClient to read data from my tunnel. Tunnel module in conjunction with > Users interaction would be responsible for channel setup and teardown. Note > that Channel setup and teardown entails special tunnelling protocol events > and hence cannot be straight Selector event driven like current > implementation in DefaultConnectingIOReactor. > > The current implementation of HTTP Core expects a SocketChannel and hence it > does not seem feasible to directly hook up any other types of channels. Do > you recommend an integration strategy that would be inline with future > direction? > > BaseIOReactor is being created by DefaultConnectingIOReactor and expects a > ChannelEntry that requires a SocketChannel. Instead an abstract ChannelEntry > that would assume channel is any nio channel could be used. This would > however require current code that expects channel to be a socket - e.g. > setting socket preferences can check if it is indeed a SocketChannel. I am > not sure how pervasive is such a change and if there is a better idea that > can prevent such change. > > -V.B. -- [web] http://www.odi.ch/ [blog] http://www.odi.ch/weblog/ [pgp] key 0x81CF3416 finger print F2B1 B21F F056 D53E 5D79 A5AF 02BE 70F5 81CF 3416 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
