org.apache.sling.discovery.impl.common
Class DefaultInstanceDescriptionImpl

java.lang.Object
  extended by org.apache.sling.discovery.impl.common.DefaultInstanceDescriptionImpl
All Implemented Interfaces:
org.apache.sling.discovery.InstanceDescription
Direct Known Subclasses:
EstablishedInstanceDescription, IncomingInstanceDescription

public class DefaultInstanceDescriptionImpl
extends Object
implements org.apache.sling.discovery.InstanceDescription

Base implementation for the InstanceDescription interface.

Allows creation of the object with clusterview and/or properties null - to be set later but before usage!


Field Summary
 
Fields inherited from interface org.apache.sling.discovery.InstanceDescription
PROPERTY_DESCRIPTION, PROPERTY_ENDPOINTS, PROPERTY_NAME
 
Constructor Summary
DefaultInstanceDescriptionImpl(DefaultClusterViewImpl clusterView, boolean isLeader, boolean isOwn, String slingId, Map<String,String> properties)
           
 
Method Summary
 boolean equals(Object obj)
           
 org.apache.sling.discovery.ClusterView getClusterView()
           
 Map<String,String> getProperties()
           
 String getProperty(String name)
           
 String getSlingId()
           
 int hashCode()
           
 boolean isLeader()
           
 boolean isLocal()
           
protected  void setClusterView(org.apache.sling.discovery.ClusterView clusterView)
          Sets the cluster on this instance
protected  void setProperties(Map<String,String> properties)
          Sets the properties of this instance
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultInstanceDescriptionImpl

public DefaultInstanceDescriptionImpl(DefaultClusterViewImpl clusterView,
                                      boolean isLeader,
                                      boolean isOwn,
                                      String slingId,
                                      Map<String,String> properties)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getClusterView

public org.apache.sling.discovery.ClusterView getClusterView()
Specified by:
getClusterView in interface org.apache.sling.discovery.InstanceDescription

setClusterView

protected void setClusterView(org.apache.sling.discovery.ClusterView clusterView)
Sets the cluster on this instance

Parameters:
clusterView -

isLeader

public boolean isLeader()
Specified by:
isLeader in interface org.apache.sling.discovery.InstanceDescription

isLocal

public boolean isLocal()
Specified by:
isLocal in interface org.apache.sling.discovery.InstanceDescription

getSlingId

public String getSlingId()
Specified by:
getSlingId in interface org.apache.sling.discovery.InstanceDescription

getProperty

public String getProperty(String name)
Specified by:
getProperty in interface org.apache.sling.discovery.InstanceDescription

getProperties

public Map<String,String> getProperties()
Specified by:
getProperties in interface org.apache.sling.discovery.InstanceDescription

setProperties

protected void setProperties(Map<String,String> properties)
Sets the properties of this instance

Parameters:
properties -


Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.