Class Hk2BridgeImpl
- java.lang.Object
-
- org.glassfish.hk2.extras.hk2bridge.internal.Hk2BridgeImpl
-
- All Implemented Interfaces:
DynamicConfigurationListener
@Singleton @Visibility(LOCAL) public class Hk2BridgeImpl extends java.lang.Object implements DynamicConfigurationListener
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classHk2BridgeImpl.NoLocalNoRemoteFilterprivate static classHk2BridgeImpl.RemoveFilter
-
Field Summary
Fields Modifier and Type Field Description private static java.util.List<java.lang.Long>EMPTY_LISTprivate Filterfilterprivate ServiceLocatorlocalprivate java.util.List<ActiveDescriptor<?>>mirroredDescriptorsprivate ServiceLocatorremote
-
Constructor Summary
Constructors Modifier Constructor Description privateHk2BridgeImpl(ServiceLocator local)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigurationChanged()This method is called when the set of descriptors in this service locator has been changed.private static java.util.List<java.lang.Long>getMetadataLongsList(Descriptor d, java.lang.String field)Gets all of the longs encoded into this descriptors metadata fieldprivate static java.util.Set<java.lang.Long>getMetadataLongsSet(Descriptor d, java.lang.String field)Gets all of the longs encoded into this descriptors metadata fieldprivate voidhandleChange(java.util.List<ActiveDescriptor<?>> newDescriptors)private voidpreDestroy()voidsetRemote(ServiceLocator remote)
-
-
-
Field Detail
-
local
private final ServiceLocator local
-
remote
private ServiceLocator remote
-
filter
private Filter filter
-
mirroredDescriptors
private java.util.List<ActiveDescriptor<?>> mirroredDescriptors
-
EMPTY_LIST
private static final java.util.List<java.lang.Long> EMPTY_LIST
-
-
Constructor Detail
-
Hk2BridgeImpl
@Inject private Hk2BridgeImpl(ServiceLocator local)
-
-
Method Detail
-
setRemote
public void setRemote(ServiceLocator remote)
-
handleChange
private void handleChange(java.util.List<ActiveDescriptor<?>> newDescriptors)
-
configurationChanged
public void configurationChanged()
Description copied from interface:DynamicConfigurationListenerThis method is called when the set of descriptors in this service locator has been changed. Changes to parent service locators descriptors will not be reported. These services are called back on the thread doing theDynamicConfiguration.commit()so care should be taken to do any work quickly. Any exception thrown from this method will be ignored. A commit that failed will not be reported to this method- Specified by:
configurationChangedin interfaceDynamicConfigurationListener
-
preDestroy
@PreDestroy private void preDestroy()
-
getMetadataLongsSet
private static java.util.Set<java.lang.Long> getMetadataLongsSet(Descriptor d, java.lang.String field)
Gets all of the longs encoded into this descriptors metadata field- Parameters:
d-field-- Returns:
-
getMetadataLongsList
private static java.util.List<java.lang.Long> getMetadataLongsList(Descriptor d, java.lang.String field)
Gets all of the longs encoded into this descriptors metadata field- Parameters:
d-field-- Returns:
-
-