com.vaadin.shared.communication
Class SharedState

java.lang.Object
  extended by com.vaadin.shared.communication.SharedState
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AbstractComponentState, JavaScriptExtensionState, JavaScriptManagerState

public class SharedState
extends java.lang.Object
implements java.io.Serializable

Interface to be implemented by all shared state classes used to communicate basic information about a Connector from server to client. Shared state classes have to be declared in shared package to be accessible both for server and client code. Shared state objects are only sent from the server to the client, and any modifications from the client should be performed via an RPC call that modifies the authoritative state on the server. A shared state class should be a bean with getters and setters for each field. Supported data types are simple Java types, other beans and maps and arrays of these. On the client side the connector should override com.vaadin.client.ui.AbstractConnector#getState() to return the correct state type. This automatically causes a correct state object to be created. Subclasses of a Connector using shared state should also provide a subclass of the shared state class of the parent class to extend the state. A single Connector can only have one shared state object.

Since:
7.0
See Also:
Serialized Form

Field Summary
 boolean enabled
           
 java.util.Set<java.lang.String> registeredEventListeners
          A set of event identifiers with registered listeners.
 java.util.Map<java.lang.String,URLReference> resources
          The automatically managed resources used by the connector.
 
Constructor Summary
SharedState()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resources

public java.util.Map<java.lang.String,URLReference> resources
The automatically managed resources used by the connector.

See Also:
com.vaadin.server.AbstractClientConnector#setResource(String, com.vaadin.server.Resource), com.vaadin.client.ui.AbstractConnector#getResourceUrl(String)

enabled

public boolean enabled

registeredEventListeners

@NoLayout
public java.util.Set<java.lang.String> registeredEventListeners
A set of event identifiers with registered listeners.

Constructor Detail

SharedState

public SharedState()


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.