On 04.12.2014 05:35, Rama A wrote:
Hi Bert,

Link which you provided is really helpful for me.

Have gone through the BasicTests.java. I have tried the checkout instead revProps in BasicTests. Whether I need to change the commands byte array.  If yes, what I have to add it in the commands.

The tunnel agent test in BasicTests.java creates a simulated svnserve protocol session in order to test the agent API and implementation. When you do this in your program, you don't have to simulate anything; you only have to write a class that implements the TunnelAgent interface. Depending on how your tunnel protocol works, you may also have to implement a CloseTunnelCallback.

When the TunnelAgent.openTunnel method is called, it gets a request and response byte channel. Your implementation must read raw bytes from the request channel and push them through your tunnel; and read raw bytes from your tunnel and push them to the response channel. You don't have to worry about where the data come from (request data will be generated in libsvn_ra_svn, and response data will be generated by the server). Your implementation is responsible for creating the raw data tunnel between the client and the server through which these data streams will flow. This can be a simple socket, for example, or it can be a completely custom protocol implementation, as long as it is bidirectional and does not modify the data stream.

See the documentation in TunnelAgent.java for details about what the various methods do. It's possible to create a single tunnel agent implementation to handle several different tunnel protocols.

-- Brane