Results 1 to 2 of 2

Thread: Checking service availability given proxy

  1. #1
    Join Date
    Nov 2007
    Location
    Netherlands
    Posts
    36

    Default Checking service availability given proxy

    Is there an easy way to detect whether or not the underlying service of an osgi:reference bean is available without having to register as a listener? For example casting to Spring's proxy interface and calling a method isBound or something?

    This would be useful for initially disabling a user interface element when using Spring-DM on the client side (Eclipse RCP).

  2. #2
    Join Date
    Oct 2005
    Posts
    26

    Default

    ((ImportedOsgiServiceProxy)yourRef).getServiceRefe rence().getTargetServiceReference() == null)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •