[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [xmlblaster] Configuring remote clients
On Mon, 2 Dec 2002, Marcel Ruff wrote:
> Heinrich Götzger wrote:
>
> >Doug,
> >
> >
> >
> >>I'm probably missing something obvious. But I've got lost somewhere.
> >>
> >>What I want to do is allow an xmlBlaster plugin to another piece of software
> >>-- a remote sensor monitoring application. Since I don't even want to assume
> >>that the xmlBlasterClient.jar present, I'd like to isolate the xmlBlaster
> >>interface into a class. When an instance of the class is created, I want to
> >>be able to initialise it with the hostname, protocol etc. of the xmlBlaster
> >>server. I'd like these to be properties that the class knows about and
> >>passes in when I do a connect(), or properties specified in the distributed
> >>xmlBlasterClient.jar. I don't want to capture command line options into a
> >>Global, since that would mean that my main() has to be written with the
> >>presence of xmlBlaster assumed.
> >>
> >>What's the best way of specifying connection properties on an on-the-fly
> >>basis?
> >>
> >>
> >>
> >
> >On-the-Fly would mean properties. Take a look at the package:
> >org.jutils.init at
> >http://www.jutils.org
> >It's in use in xmlBlaster anyway.
> >
> >Or use the -D in the commandline.
> >
> >Or use something like following for the hardcoded way:
> >[...]
> >Global glob = null;
> >Properties prop System.getProperties();
> >
> >prop.setProperty("client.protocol", "SOCKET");
> >prop.setProperty("socket.port", "7607");
> >prop.setProperty("socket.hostname", "localhost");
> >
> >glob = new Global(prop);
> >[...]
> >
> >
> >HTH,
> >regards
> >
> >Heinrich
> >
> >
> >
> >
> Another ways is to use
>
> ConnectQos.java -> setAddress()
>
> and
>
> Address a = new Address(glob);
> a.setType("SOCKET");
> a.setAddress("127.0.0.1:7600");
> a.setCollectTime(12345L);
> a.setPingInterval(54321L);
> a.setRetries(17);
> a.setDelay(7890L);
> a.setOneway(true);
> a.setSessionId("0x4546hwi89");
Cool, this comes if you read the requirements closly ;-)
And what do I need the Global for now?
Heinrich