org.jboss.soa.esb.listeners.ha
Class ServiceClusterInfoImpl

java.lang.Object
  extended by org.jboss.soa.esb.listeners.ha.ServiceClusterInfoImpl
All Implemented Interfaces:
ServiceClusterInfo

public class ServiceClusterInfoImpl
extends java.lang.Object
implements ServiceClusterInfo

Default implementation of ServiceClusterInfo. Holder for a list of eprs all belonging to the same service. Code based on jbossas ha framework.

Author:
Kurt Stam.

Field Summary
 java.lang.String serviceName
           
 
Fields inherited from interface org.jboss.soa.esb.listeners.ha.ServiceClusterInfo
UNINITIALIZED_CURSOR
 
Constructor Summary
ServiceClusterInfoImpl(java.lang.String serviceName, java.util.List<EPR> eprs)
           
 
Method Summary
 int getCursor()
           
 java.util.List<EPR> getEPRs()
          Returns an unmodifiable view of the target list.
 java.lang.String getServiceName()
          Returns the ServiceName.
 java.util.List<EPR> removeDeadEPR(EPR epr)
          Remove the given epr from the list of eprs.
 int setCursor(int cursor)
           
 java.lang.String toString()
           
 java.util.List<EPR> updateClusterInfo(java.util.List<EPR> eprs)
          Updates the eprs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serviceName

public java.lang.String serviceName
Constructor Detail

ServiceClusterInfoImpl

public ServiceClusterInfoImpl(java.lang.String serviceName,
                              java.util.List<EPR> eprs)
Method Detail

getServiceName

public java.lang.String getServiceName()
Returns the ServiceName.

Specified by:
getServiceName in interface ServiceClusterInfo

getEPRs

public java.util.List<EPR> getEPRs()
Returns an unmodifiable view of the target list.

Specified by:
getEPRs in interface ServiceClusterInfo

getCursor

public int getCursor()
Specified by:
getCursor in interface ServiceClusterInfo

setCursor

public int setCursor(int cursor)
Specified by:
setCursor in interface ServiceClusterInfo

removeDeadEPR

public java.util.List<EPR> removeDeadEPR(EPR epr)
Description copied from interface: ServiceClusterInfo
Remove the given epr from the list of eprs.

Specified by:
removeDeadEPR in interface ServiceClusterInfo
Returns:
the updated list of EPRs

updateClusterInfo

public java.util.List<EPR> updateClusterInfo(java.util.List<EPR> eprs)
Description copied from interface: ServiceClusterInfo
Updates the eprs.

Specified by:
updateClusterInfo in interface ServiceClusterInfo

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object