com.softwareag.um.io.ServerContextBuilderFactory Class Reference

This factory allows you to construct ServerContextBuilders and therefore ServerTransportContexts by passing a String URL. More...

Detailed Description

This factory allows you to construct ServerContextBuilders and therefore ServerTransportContexts by passing a String URL.

This way you can compile an application which is Transport agnostic and simply change the URL passed to the application to switch from SHM to Sockets etc. A URL is of the form protocol://host:port?Property=value&Property2=value2 The relevant ServerContextBuilder will be constructed based on the protocol and then the properties will be set using reflection. So on a ServerSocketTransportContext there is a method: withWriteBufferSize(int b) that you could set to 150000 using a URL like this:

* String url = "tcp://localhost:8080?WriteBufferSize=150000";
* ServerTransportContext context = ServerContextBuilderFactory.getBuilder(url).build();
*

Please note that the method is "withWriteBufferSize" but you should pass "WriteBufferSize" to the query string