Package com.sun.corba.ee.impl.transport
Class ContactInfoListImpl
- java.lang.Object
-
- com.sun.corba.ee.impl.transport.ContactInfoListImpl
-
- All Implemented Interfaces:
ContactInfoList
- Direct Known Subclasses:
NoConnectionCacheImpl.NCCContactInfoListImpl,SocketFactoryContactInfoListImpl
public class ContactInfoListImpl extends java.lang.Object implements ContactInfoList
-
-
Field Summary
Fields Modifier and Type Field Description protected IOReffectiveTargetIORprotected java.util.List<ContactInfo>effectiveTargetIORContactInfoListprivate java.util.concurrent.locks.ReadWriteLocklcrdLockprotected LocalClientRequestDispatcherlocalClientRequestDispatcherprotected ORBorbprotected ContactInfoprimaryContactInfoprivate static java.lang.ThreadLocal<java.lang.Boolean>skipRotateprivate intstartCountprotected IORtargetIORprivate org.glassfish.pfl.basic.func.UnaryPredicate<ContactInfo>testPredprivate booleanusePerRequestLoadBalancingprivate static ORBUtilSystemExceptionwrapper
-
Constructor Summary
Constructors Constructor Description ContactInfoListImpl(ORB orb)ContactInfoListImpl(ORB orb, IOR targetIOR)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddRemoteContactInfos(IOR effectiveTargetIOR, java.util.List<ContactInfo> effectiveTargetIORContactInfoList)private voidchangingEffectiveAddress(IIOPAddress oldAddr, IIOPAddress newAddr)protected ContactInfocreateContactInfo(java.lang.String type, java.lang.String hostname, int port)private voidcreateContactInfoList()private voiddisplay(java.lang.String msg, int value)private voiddisplay(java.lang.String msg, java.lang.Object value)booleanequals(java.lang.Object obj)private <T> java.util.List<T>filter(java.util.List<T> arg, org.glassfish.pfl.basic.func.UnaryPredicate<T> pred)IORgetEffectiveTargetIOR()LocalClientRequestDispatchergetLocalClientRequestDispatcher()private IIOPAddressgetPrimaryAddress(IOR ior)ContactInfogetPrimaryContactInfo()IORgetTargetIOR()inthashCode()java.util.Iterator<ContactInfo>iterator()private java.util.List<ContactInfo>rotate(java.util.List<ContactInfo> arg)voidsetEffectiveTargetIOR(IOR newIOR)protected voidsetLocalSubcontract()setLocalSubcontract sets cached information that is set whenever the effectiveTargetIOR changes.static voidsetSkipRotate()voidsetTargetIOR(IOR targetIOR)
-
-
-
Field Detail
-
wrapper
private static final ORBUtilSystemException wrapper
-
orb
protected ORB orb
-
lcrdLock
private java.util.concurrent.locks.ReadWriteLock lcrdLock
-
localClientRequestDispatcher
protected LocalClientRequestDispatcher localClientRequestDispatcher
-
targetIOR
protected IOR targetIOR
-
effectiveTargetIOR
protected IOR effectiveTargetIOR
-
effectiveTargetIORContactInfoList
protected java.util.List<ContactInfo> effectiveTargetIORContactInfoList
-
primaryContactInfo
protected ContactInfo primaryContactInfo
-
usePerRequestLoadBalancing
private boolean usePerRequestLoadBalancing
-
startCount
private int startCount
-
testPred
private org.glassfish.pfl.basic.func.UnaryPredicate<ContactInfo> testPred
-
skipRotate
private static java.lang.ThreadLocal<java.lang.Boolean> skipRotate
-
-
Method Detail
-
filter
private <T> java.util.List<T> filter(java.util.List<T> arg, org.glassfish.pfl.basic.func.UnaryPredicate<T> pred)
-
setSkipRotate
public static void setSkipRotate()
-
display
@InfoMethod private void display(java.lang.String msg, int value)
-
display
@InfoMethod private void display(java.lang.String msg, java.lang.Object value)
-
rotate
private java.util.List<ContactInfo> rotate(java.util.List<ContactInfo> arg)
-
iterator
public java.util.Iterator<ContactInfo> iterator()
- Specified by:
iteratorin interfaceContactInfoList
-
setTargetIOR
public void setTargetIOR(IOR targetIOR)
- Specified by:
setTargetIORin interfaceContactInfoList
-
getTargetIOR
public IOR getTargetIOR()
- Specified by:
getTargetIORin interfaceContactInfoList
-
getPrimaryAddress
private IIOPAddress getPrimaryAddress(IOR ior)
-
changingEffectiveAddress
@InfoMethod private void changingEffectiveAddress(IIOPAddress oldAddr, IIOPAddress newAddr)
-
setEffectiveTargetIOR
public void setEffectiveTargetIOR(IOR newIOR)
- Specified by:
setEffectiveTargetIORin interfaceContactInfoList
-
getEffectiveTargetIOR
public IOR getEffectiveTargetIOR()
- Specified by:
getEffectiveTargetIORin interfaceContactInfoList
-
getLocalClientRequestDispatcher
public LocalClientRequestDispatcher getLocalClientRequestDispatcher()
- Specified by:
getLocalClientRequestDispatcherin interfaceContactInfoList
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceContactInfoList- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
createContactInfoList
private void createContactInfoList()
-
addRemoteContactInfos
private void addRemoteContactInfos(IOR effectiveTargetIOR, java.util.List<ContactInfo> effectiveTargetIORContactInfoList)
-
createContactInfo
protected ContactInfo createContactInfo(java.lang.String type, java.lang.String hostname, int port)
-
setLocalSubcontract
protected void setLocalSubcontract()
setLocalSubcontract sets cached information that is set whenever the effectiveTargetIOR changes. Note: this must be maintained accurately whether or not the ORB allows local optimization, because ServantManagers in the POA ALWAYS use local optimization ONLY (they do not have a remote case).
-
getPrimaryContactInfo
public ContactInfo getPrimaryContactInfo()
-
-