iPOJO では、サービス コンシューマーでサービス プロパティ ( getProperty(key) など) を読み取る方法はありますか? パブリッシャーは非常に簡単ですが、コンシューマーではフィルターしか使用できないようです。
ありがとう
サービス プロパティを取得するには、コールバックを使用する必要があります。
@Bind
public void bindService(HelloService hello, Dictionary<String, Object> properties) {
// ...
}
また
@Bind
public void bindService(HelloService hello, Map<String, Object> properties) {
// ...
}
OSGi サービス登録を取得することもできます。
@Bind
public void bindService(HelloService hello, ServiceReference<HelloService> reference) {
// ...
}