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 class
Hk2BridgeImpl.NoLocalNoRemoteFilter
private static class
Hk2BridgeImpl.RemoveFilter
-
Field Summary
Fields Modifier and Type Field Description private static java.util.List<java.lang.Long>
EMPTY_LIST
private Filter
filter
private ServiceLocator
local
private java.util.List<ActiveDescriptor<?>>
mirroredDescriptors
private ServiceLocator
remote
-
Constructor Summary
Constructors Modifier Constructor Description private
Hk2BridgeImpl(ServiceLocator local)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configurationChanged()
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 void
handleChange(java.util.List<ActiveDescriptor<?>> newDescriptors)
private void
preDestroy()
void
setRemote(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:DynamicConfigurationListener
This 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:
configurationChanged
in 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:
-
-