Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » OSGI Services... LogReaderService ...
OSGI Services... LogReaderService ... [message #153053] Wed, 17 May 2006 22:30 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #153153 is a reply to message #153053] Thu, 18 May 2006 11:22 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

And check out http://www.eclipse.org/equinox/bundles for a list of some
services that have been implemented.

Later,
PW


Re: OSGI Services... LogReaderService ... [message #153161 is a reply to message #153080] Thu, 18 May 2006 14:17 Go to previous messageGo to next message
Eclipse UserFriend
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
>
Re: OSGI Services... LogReaderService ... [message #153178 is a reply to message #153153] Thu, 18 May 2006 14:28 Go to previous message
Eclipse UserFriend
Originally posted by: mgervais.signaturegenetics.com

Thanks again.
"Paul Webster" <pwebster@ca.ibm.com> wrote in message
news:e4hlfk$6do$2@utils.eclipse.org...
>
>
> And check out http://www.eclipse.org/equinox/bundles for a list of some
> services that have been implemented.
>
> Later,
> PW
Previous Topic:Where to find out if this environment is right for me.
Next Topic:Couple of questions
Goto Forum:
  


Current Time: Sat Apr 27 04:13:27 GMT 2024

Powered by FUDForum. Page generated in 0.09558 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top