Methods Summary |
---|
protected void | addRemoteContactInfos(com.sun.corba.se.spi.ior.IOR effectiveTargetIOR, java.util.List effectiveTargetIORContactInfoList)
ContactInfo contactInfo;
List socketInfos = orb.getORBData()
.getIORToSocketInfo().getSocketInfo(effectiveTargetIOR);
Iterator iterator = socketInfos.iterator();
while (iterator.hasNext()) {
SocketInfo socketInfo = (SocketInfo) iterator.next();
String type = socketInfo.getType();
String host = socketInfo.getHost().toLowerCase();
int port = socketInfo.getPort();
contactInfo = createContactInfo(type, host, port);
effectiveTargetIORContactInfoList.add(contactInfo);
}
|
protected com.sun.corba.se.pept.transport.ContactInfo | createContactInfo(java.lang.String type, java.lang.String hostname, int port)
return new SocketOrChannelContactInfoImpl(
orb, this,
// XREVISIT - See Base Line 62
effectiveTargetIOR,
orb.getORBData().getGIOPAddressDisposition(),
type, hostname, port);
|
protected void | createContactInfoList()
if (effectiveTargetIORContactInfoList != null) {
return;
}
effectiveTargetIORContactInfoList = new ArrayList();
IIOPProfile iiopProfile = effectiveTargetIOR.getProfile();
String hostname =
((IIOPProfileTemplate)iiopProfile.getTaggedProfileTemplate())
.getPrimaryAddress().getHost().toLowerCase();
int port =
((IIOPProfileTemplate)iiopProfile.getTaggedProfileTemplate())
.getPrimaryAddress().getPort();
// For use by "sticky manager" if one is registered.
primaryContactInfo =
createContactInfo(SocketInfo.IIOP_CLEAR_TEXT, hostname, port);
if (iiopProfile.isLocal()) {
// NOTE: IMPORTANT:
// Only do local. The APP Server interceptors check
// effectiveTarget.isLocal - which is determined via
// the IOR - so if we added other addresses then
// transactions and interceptors would not execute.
ContactInfo contactInfo = new SharedCDRContactInfoImpl(
orb, this, effectiveTargetIOR,
orb.getORBData().getGIOPAddressDisposition());
effectiveTargetIORContactInfoList.add(contactInfo);
} else {
addRemoteContactInfos(effectiveTargetIOR,
effectiveTargetIORContactInfoList);
}
|
public synchronized com.sun.corba.se.spi.ior.IOR | getEffectiveTargetIOR()
return effectiveTargetIOR;
|
public synchronized com.sun.corba.se.spi.protocol.LocalClientRequestDispatcher | getLocalClientRequestDispatcher()
return LocalClientRequestDispatcher;
|
public synchronized com.sun.corba.se.spi.ior.IOR | getTargetIOR()
return targetIOR;
|
public synchronized int | hashCode()
return targetIOR.hashCode();
|
public synchronized java.util.Iterator | iterator()
createContactInfoList();
return new CorbaContactInfoListIteratorImpl(
orb, this, primaryContactInfo,
effectiveTargetIORContactInfoList);
|
public synchronized void | setEffectiveTargetIOR(com.sun.corba.se.spi.ior.IOR effectiveTargetIOR)
this.effectiveTargetIOR = effectiveTargetIOR;
effectiveTargetIORContactInfoList = null;
if (primaryContactInfo != null &&
orb.getORBData().getIIOPPrimaryToContactInfo() != null)
{
orb.getORBData().getIIOPPrimaryToContactInfo()
.reset(primaryContactInfo);
}
primaryContactInfo = null;
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).
if (!effectiveTargetIOR.getProfile().isLocal()) {
LocalClientRequestDispatcher = new NotLocalLocalCRDImpl();
return;
}
// XXX Note that this always uses the first IIOP profile to get the
// scid. What about multi-profile IORs? This should perhaps be
// tied to the current ContactInfo in some way, together with an
// implementation of ClientDelegate that generally prefers co-located
// ContactInfo. This may in fact mean that we should do this at
// the ContactInfo level, rather than the IOR/profile level.
int scid = effectiveTargetIOR.getProfile().getObjectKeyTemplate().
getSubcontractId() ;
LocalClientRequestDispatcherFactory lcsf = orb.getRequestDispatcherRegistry().getLocalClientRequestDispatcherFactory( scid ) ;
LocalClientRequestDispatcher = lcsf.create( scid, effectiveTargetIOR ) ;
|
public synchronized void | setTargetIOR(com.sun.corba.se.spi.ior.IOR targetIOR)
this.targetIOR = targetIOR;
setEffectiveTargetIOR(targetIOR);
|