public abstract class AbstractProjectedGrid extends java.lang.Object implements ProjectedGrid
ProjectedGrid
base implementation.Constructor and Description |
---|
AbstractProjectedGrid(Grid grid)
Instantiates a new abstract projected grid.
|
Modifier and Type | Method and Description |
---|---|
void |
addProjectedGridListener(ProjectedGridListener listener)
Adds a listener to be notified of projected grid events.
|
boolean |
addProjection(GridProjection projection)
Adds a new grid projection.
|
java.util.Collection<GridProjection> |
getProjections()
Gets a collection of grid projections or empty collection of there
are no projections defined.
|
protected void |
notifyGridProjectionAdded(GridProjection projection)
Notifies registered
ProjectedGridListener s that
a GridProjection has been added to a ProjectedGrid . |
protected void |
notifyGridProjectionRemoved(GridProjection projection)
Notifies registered
ProjectedGridListener s that
a GridProjection has been removed from a ProjectedGrid . |
protected void |
notifyMemberAdded(GridProjection projection,
GridMember member)
Notifies registered
ContainerGridGroupsListener s that
a ContainerNode has been added to a ContainerGroup . |
protected void |
notifyMemberRemoved(GridProjection projection,
GridMember member)
Notifies registered
ContainerGridGroupsListener s that
a ContainerNode has been removed from a ContainerGroup . |
boolean |
removeProjection(GridProjection projection)
Removes a grid projection.
|
public AbstractProjectedGrid(Grid grid)
grid
- the gridpublic boolean addProjection(GridProjection projection)
ProjectedGrid
If a projected grid refuses to add a particular grid projection for any reason other than that it already contains the grid projection, it must throw an exception (rather than returning false). This preserves the invariant that a projected grid always contains the specified grid projection after this call returns.
addProjection
in interface ProjectedGrid
projection
- the grid projectionpublic boolean removeProjection(GridProjection projection)
ProjectedGrid
Removes a single instance of the specified grid projection from this projected grid, if it is present.
removeProjection
in interface ProjectedGrid
projection
- the grid projectionpublic java.util.Collection<GridProjection> getProjections()
ProjectedGrid
getProjections
in interface ProjectedGrid
public void addProjectedGridListener(ProjectedGridListener listener)
ProjectedGrid
addProjectedGridListener
in interface ProjectedGrid
listener
- the projected grid listenerprotected void notifyGridProjectionAdded(GridProjection projection)
ProjectedGridListener
s that
a GridProjection
has been added to a ProjectedGrid
.projection
- the grid projectionprotected void notifyGridProjectionRemoved(GridProjection projection)
ProjectedGridListener
s that
a GridProjection
has been removed from a ProjectedGrid
.projection
- the grid projectionprotected void notifyMemberAdded(GridProjection projection, GridMember member)
ContainerGridGroupsListener
s that
a ContainerNode
has been added to a ContainerGroup
.projection
- the grid projectionmember
- the grid memberprotected void notifyMemberRemoved(GridProjection projection, GridMember member)
ContainerGridGroupsListener
s that
a ContainerNode
has been removed from a ContainerGroup
.projection
- the groupmember
- the node