OSGI Services... LogReaderService ... [message #153053] |
Wed, 17 May 2006 22:30 |
Eclipse User |
|
|
|
Originally posted by: mgervais.signaturegenetics.com
Hi,
I'm developping an rcp application. I've several questions:
-When I run my product, the org.eclipse.osgi framework is launch, if I
understand correctly it's the implementation of the OSGI specifications?
-How can I access to services of the framework? For example I want to get
the LogReaderService, which should be started with the framework? But I
don't konw if this interface is implemented in equinox... If not how can I
do it and register this service?
Thanks for you help, if you have some samples it would be apreciated...
Mickael
|
|
|
Re: OSGI Services... LogReaderService ... [message #153080 is a reply to message #153053] |
Thu, 18 May 2006 08:05 |
Eclipse User |
|
|
|
Originally posted by: neil.integility.com
Gervais,
- Yes, "org.eclipse.osgi" is the system bundle that implements the
framework.
- Services of the framework are accessed the same as any other services
(because they ARE the same). The nicest way to do this is with Declarative
Services. The lower-level way is to use a ServiceTracker, eg:
ServiceTracker logReaderTracker = new ServiceTracker(context,
LogReaderService.class.getName(), null);
logReaderTracker.open();
// Later...
LogReaderService logReader = (LogReaderService)
logReaderTracker.getService();
if(logReader != null) {
// Do something with logReader
}
// Later still...
logReaderTracker.close();
- LogService and LogReaderService are implemented in Equinox by the
"org.eclipse.equinox.log" bundle. If you start that bundle, then you will
get a LogService and a LogReaderService that you can use. If you don't,
then you won't.
Kind regards
Neil Bartlett
Gervais Mickael wrote:
> Hi,
> I'm developping an rcp application. I've several questions:
> -When I run my product, the org.eclipse.osgi framework is launch, if I
> understand correctly it's the implementation of the OSGI specifications?
> -How can I access to services of the framework? For example I want to get
> the LogReaderService, which should be started with the framework? But I
> don't konw if this interface is implemented in equinox... If not how can I
> do it and register this service?
> Thanks for you help, if you have some samples it would be apreciated...
> Mickael
|
|
|
|
Re: OSGI Services... LogReaderService ... [message #153161 is a reply to message #153080] |
Thu, 18 May 2006 14:17 |
Eclipse User |
|
|
|
Originally posted by: mgervais.signaturegenetics.com
Thanks for your help,
it has been very helpfull for me. I'm trying to add the bundle
org.eclipse.equinox.log to my product by it's not in the list, maybe it's
due to I'm using Eclipse 3.2...
Thanks
Miclael
"Neil Bartlett" <neil@integility.com> wrote in message
news:fe14d0978e0748c8b84412e4e76a0b95$1@www.eclipse.org...
> Gervais,
>
> - Yes, "org.eclipse.osgi" is the system bundle that implements the
> framework.
>
> - Services of the framework are accessed the same as any other services
> (because they ARE the same). The nicest way to do this is with Declarative
> Services. The lower-level way is to use a ServiceTracker, eg:
>
> ServiceTracker logReaderTracker = new ServiceTracker(context,
> LogReaderService.class.getName(), null);
> logReaderTracker.open();
>
> // Later...
> LogReaderService logReader = (LogReaderService)
> logReaderTracker.getService();
> if(logReader != null) {
> // Do something with logReader
> }
>
> // Later still...
> logReaderTracker.close();
>
>
> - LogService and LogReaderService are implemented in Equinox by the
> "org.eclipse.equinox.log" bundle. If you start that bundle, then you will
> get a LogService and a LogReaderService that you can use. If you don't,
> then you won't.
>
>
> Kind regards
> Neil Bartlett
>
>
>
> Gervais Mickael wrote:
>
>> Hi,
>> I'm developping an rcp application. I've several questions:
>> -When I run my product, the org.eclipse.osgi framework is launch, if I
>> understand correctly it's the implementation of the OSGI specifications?
>> -How can I access to services of the framework? For example I want to get
>> the LogReaderService, which should be started with the framework? But I
>> don't konw if this interface is implemented in equinox... If not how can
>> I do it and register this service?
>> Thanks for you help, if you have some samples it would be apreciated...
>> Mickael
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.09558 seconds