Package com.vaadin.client
Class Registry
java.lang.Object
com.vaadin.client.Registry
- Direct Known Subclasses:
DefaultRegistry
A registry of singleton instances, such as
ServerRpcQueue, which can
be looked up based on their class.- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final <T> TGets an instance of the given type from the lookup table.Gets theApplicationConfigurationsingleton.Gets theApplicationConnectionsingleton.Gets theConnectionStateHandlersingleton.Gets theConstantPoolsingleton.Gets theDependencyLoadersingleton.Gets theExecuteJavaScriptProcessorsingleton.Gets theExistingElementMapsingleton.Gets theHeartbeatsingleton.Gets theInitialPropertiesHandlersingleton.Gets theMessageHandlersingleton.Gets theMessageSendersingleton.Gets thePollersingleton.Gets thePushConfigurationsingleton.Gets theReconnectConfigurationsingleton.Gets theRequestResponseTrackersingleton.Gets theResourceLoadersingleton.Gets theServerConnectorsingleton.Gets theServerRpcQueuesingleton.Gets theStateTreesingleton.Gets theSystemErrorHandlersingleton.Gets theUILifecyclesingleton.Gets theURIResolversingleton.Gets theXhrConnectionsingleton.voidreset()Deletes and recreates resettable instances of registry singletons.protected final <T> voidStores an instance of the given type.protected final <T> voidStores an instance of the given type.
-
Constructor Details
-
Registry
public Registry()Creates a new empty registry.Use
set(Class, Object)to populate the registry.
-
-
Method Details
-
set
Stores an instance of the given type.Note that instances by default are considered final, and you are not allowed to update an instance of any given type manually. In case instance is allowed to be recreated use
set(Class, Supplier).- Type Parameters:
T- the type- Parameters:
type- the type to storeinstance- the instance to store
-
set
Stores an instance of the given type.Note that instances by default are considered final, and you are not allowed to update an instance of any given type manually. Uses resettable supplier to allow Registry to recreate given instances.
- Type Parameters:
T- the type- Parameters:
type- the type to storeinstanceSupplier- new instances supplier if given registry entry can be reset
-
get
Gets an instance of the given type from the lookup table.- Type Parameters:
T- the class type- Parameters:
type- the type to get- Returns:
- the stored instance or null if no instance has been stored
-
getMessageSender
Gets theMessageSendersingleton.- Returns:
- the
MessageSendersingleton
-
getMessageHandler
Gets theMessageHandlersingleton.- Returns:
- the
MessageHandlersingleton
-
getApplicationConnection
Gets theApplicationConnectionsingleton.- Returns:
- the
ApplicationConnectionsingleton
-
getHeartbeat
Gets theHeartbeatsingleton.- Returns:
- the
Heartbeatsingleton
-
getConnectionStateHandler
Gets theConnectionStateHandlersingleton.- Returns:
- the
ConnectionStateHandlersingleton
-
getServerRpcQueue
Gets theServerRpcQueuesingleton.- Returns:
- the
ServerRpcQueuesingleton
-
getApplicationConfiguration
Gets theApplicationConfigurationsingleton.- Returns:
- the
ApplicationConfigurationsingleton
-
getStateTree
Gets theStateTreesingleton.- Returns:
- the
StateTreesingleton
-
getPushConfiguration
Gets thePushConfigurationsingleton.- Returns:
- the
PushConfigurationsingleton
-
getXhrConnection
Gets theXhrConnectionsingleton.- Returns:
- the
XhrConnectionsingleton
-
getURIResolver
Gets theURIResolversingleton.- Returns:
- the
URIResolversingleton
-
getDependencyLoader
Gets theDependencyLoadersingleton.- Returns:
- the
DependencyLoadersingleton
-
getSystemErrorHandler
Gets theSystemErrorHandlersingleton.- Returns:
- the
SystemErrorHandlersingleton
-
getUILifecycle
Gets theUILifecyclesingleton.- Returns:
- the
UILifecyclesingleton
-
getRequestResponseTracker
Gets theRequestResponseTrackersingleton.- Returns:
- the
RequestResponseTrackersingleton
-
getReconnectConfiguration
Gets theReconnectConfigurationsingleton.- Returns:
- the
ReconnectConfigurationsingleton
-
getExecuteJavaScriptProcessor
Gets theExecuteJavaScriptProcessorsingleton.- Returns:
- the
ExecuteJavaScriptProcessorsingleton
-
getServerConnector
Gets theServerConnectorsingleton.- Returns:
- the
ServerConnectorsingleton
-
getResourceLoader
Gets theResourceLoadersingleton.- Returns:
- the
ResourceLoadersingleton
-
getConstantPool
Gets theConstantPoolsingleton.- Returns:
- the
ConstantPoolsingleton
-
getExistingElementMap
Gets theExistingElementMapsingleton.- Returns:
- the
ExistingElementMapsingleton
-
getInitialPropertiesHandler
Gets theInitialPropertiesHandlersingleton.- Returns:
- the
InitialPropertiesHandlersingleton
-
getPoller
Gets thePollersingleton.- Returns:
- the
Pollersingleton
-
reset
public void reset()Deletes and recreates resettable instances of registry singletons.
-