This is useful as a workaround, however if I want to use this to drive
an applet on a WEB page, for instance, I don't want to have to hardcode
into the applet the address of where to get data. I'd much rather
create a properties file on the server, and somehow tell the package
that it needs to get it's properties from a particular stream.
That way, if I have a page with 50 applets on it, I could pass a
parameter to the applet as to where to get the properties from.
Just a thought-
David
>>> Kay-Uwe Kasemir <[email protected]> 5/11/2007 12:02 PM >>>
On May 11, 2007, at 10:45 , David Dudley wrote:
> All is fine and good to be able to use this, -except-, in the case
of
> distributing an application, or as an applet, there is no way to
> provide
> a location of where to get the 'JCALibrary.properties' file. Can
the
> capability of providing a location (preferably being able to use a
URL
> Link as well) be added to 'getInstance' (or should I do it?)?
Actually I think you can already put something like this in your code:
System.setProperty("com.cosylab.epics.caj.CAJContext.addr_list",
... your value ...);
System.setProperty
("com.cosylab.epics.caj.CAJContext.auto_addr_list",
... "YES" or "NO" ...);
Meaning:
All that's usually loaded from the JCALibrary.properties
can be initialized in your code.
So you can hardcode it in your application,
or have your application read that info from
some jar file location as you suggest and copy it to
System.setProperty().
> Also, is there a way to create a channel and then 'add' a connection
> Listener as a separate function?
Maybe not. But not a show stopper:
Just always create the channel with your 'Forwarding Listener',
and then those later listeners register with your 'Forwarding
Listener'.
Of course you'll have to implement that 'Forwarding Listener'.
> Or a way to close a channel?
There is a
Channel.destroy()
as well as a
Channel.dispose().
I don't know the difference, but I use the 'destroy()' call and
that works nicely.
Beware, though:
If you have listeners, the 'JNI' version will completely remove the
channel and all listener information,
while the 'CAJ' version might still invoke your listener
with another value update, where the status is actually
indicating "channel was destroyed",
so it makes some sense, it's just that most people who've used
the JNI (C/C++) based CA client lib might not expect another
event from the destroyed channel.
-Kay
BEGIN:VCARD
VERSION:2.1
X-GWTYPE:USER
FN:David Dudley
TEL;WORK:880-3740
ORG:;MIS
TEL;PREF;FAX:880-3741
EMAIL;WORK;PREF;NGW:[email protected]
N:Dudley;David
END:VCARD
- References:
- JCA Library usage David Dudley
- Re: JCA Library usage Kay-Uwe Kasemir
- Navigate by Date:
- Prev:
Re: JCA Library usage Kay-Uwe Kasemir
- Next:
Re: Accessing Date and Time information Ralph Lange
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
<2007>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: JCA Library usage Kay-Uwe Kasemir
- Next:
Asyn Delay Robert Emery
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
<2007>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|