org.sonatype.guice.bean.locators.spi
Interface BindingPublisher


public interface BindingPublisher

Publisher of Bindings to interested BindingSubscribers.


Method Summary
<T> boolean
contains(com.google.inject.Binding<T> binding)
          Determines whether or not the given Binding belongs to this publisher.
<T> void
subscribe(com.google.inject.TypeLiteral<T> type, BindingSubscriber subscriber)
          Subscribes the given BindingSubscriber to receive Bindings of the given type.
<T> void
unsubscribe(com.google.inject.TypeLiteral<T> type, BindingSubscriber subscriber)
          Stops the given BindingSubscriber from receiving Bindings of the given type.
 

Method Detail

subscribe

<T> void subscribe(com.google.inject.TypeLiteral<T> type,
                   BindingSubscriber subscriber)
Subscribes the given BindingSubscriber to receive Bindings of the given type.

Parameters:
type - The binding type
subscriber - The subscriber

contains

<T> boolean contains(com.google.inject.Binding<T> binding)
Determines whether or not the given Binding belongs to this publisher.

Parameters:
binding - The binding
Returns:
true if the binding belongs to this publisher; otherwise false

unsubscribe

<T> void unsubscribe(com.google.inject.TypeLiteral<T> type,
                     BindingSubscriber subscriber)
Stops the given BindingSubscriber from receiving Bindings of the given type.

Parameters:
type - The binding type
subscriber - The subscriber


Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.