Package com.sun.corba.ee.impl.ior.iiop
Class IIOPProfileImpl
- java.lang.Object
-
- com.sun.corba.ee.spi.ior.IdentifiableBase
-
- com.sun.corba.ee.impl.ior.iiop.IIOPProfileImpl
-
- All Implemented Interfaces:
Identifiable,IIOPProfile,MakeImmutable,TaggedProfile,Writeable,WriteContents
- Direct Known Subclasses:
VirtualAddressAgentImpl.SpecialIIOPProfileImpl
public class IIOPProfileImpl extends IdentifiableBase implements IIOPProfile
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classIIOPProfileImpl.LocalCodeBaseSingletonHolder
-
Field Summary
Fields Modifier and Type Field Description protected booleancachedCodebaseprivate booleancachedIsLocalprivate booleancheckedIsLocalprotected java.lang.Stringcodebaseprivate GIOPVersiongiopVersionprivate ObjectKeyobjectKeyprivate ObjectIdoidprivate ObjectKeyTemplateoktempprivate ORBorbprivate IIOPProfileTemplateproftempprivate static IORSystemExceptionwrapper
-
Constructor Summary
Constructors Modifier Constructor Description privateIIOPProfileImpl(ORB orb)IIOPProfileImpl(ORB orb, ObjectKeyTemplate oktemp, ObjectId oid, IIOPProfileTemplate proftemp)IIOPProfileImpl(ORB orb, TaggedProfile profile)IIOPProfileImpl(InputStream is)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcomputingIsLocal(java.lang.String host, int scid, int sid, int port)booleanequals(java.lang.Object obj)java.lang.StringgetCodebase()Return the Codebase of this profile.GIOPVersiongetGIOPVersion()Return GIOPVersion for this IOR.intgetId()Return the (type) identity of this entity.TaggedProfilegetIOPProfile()Return the TaggedProfile as a CDR encapsulation in the standard format.ObjectIdgetObjectId()ObjectKeygetObjectKey()ObjectKeyTemplategetObjectKeyTemplate()ORBVersiongetORBVersion()java.lang.ObjectgetServant()Return the servant for this IOR, if it is local AND if the OA that implements this objref supports direct access to servants outside of an invocation.TaggedProfileTemplategetTaggedProfileTemplate()inthashCode()private voidinit(InputStream istr)booleanisEquivalent(TaggedProfile prof)Return true is prof is equivalent to this TaggedProfile.private booleanisForeignObject()booleanisLocal()Return true if this TaggedProfile was created in orb.private voidisLocalResults(boolean isLocalHost, boolean isLocalServerId, boolean isLocalPort)voidmakeImmutable()java.lang.StringtoString()private java.lang.StringuncachedGetCodeBase()voidwriteContents(OutputStream os)-
Methods inherited from class com.sun.corba.ee.spi.ior.IdentifiableBase
write
-
-
-
-
Field Detail
-
wrapper
private static final IORSystemException wrapper
-
orb
private ORB orb
-
oid
private ObjectId oid
-
proftemp
private IIOPProfileTemplate proftemp
-
oktemp
private ObjectKeyTemplate oktemp
-
objectKey
private ObjectKey objectKey
-
codebase
protected java.lang.String codebase
-
cachedCodebase
protected boolean cachedCodebase
-
checkedIsLocal
private boolean checkedIsLocal
-
cachedIsLocal
private boolean cachedIsLocal
-
giopVersion
private GIOPVersion giopVersion
-
-
Constructor Detail
-
IIOPProfileImpl
private IIOPProfileImpl(ORB orb)
-
IIOPProfileImpl
public IIOPProfileImpl(ORB orb, ObjectKeyTemplate oktemp, ObjectId oid, IIOPProfileTemplate proftemp)
-
IIOPProfileImpl
public IIOPProfileImpl(InputStream is)
-
IIOPProfileImpl
public IIOPProfileImpl(ORB orb, TaggedProfile profile)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getObjectId
public ObjectId getObjectId()
- Specified by:
getObjectIdin interfaceTaggedProfile
-
getTaggedProfileTemplate
public TaggedProfileTemplate getTaggedProfileTemplate()
- Specified by:
getTaggedProfileTemplatein interfaceTaggedProfile
-
getObjectKeyTemplate
public ObjectKeyTemplate getObjectKeyTemplate()
- Specified by:
getObjectKeyTemplatein interfaceTaggedProfile
-
init
private void init(InputStream istr)
-
writeContents
public void writeContents(OutputStream os)
- Specified by:
writeContentsin interfaceWriteContents
-
getId
public int getId()
Description copied from interface:IdentifiableReturn the (type) identity of this entity.- Specified by:
getIdin interfaceIdentifiable- Returns:
- int
-
isEquivalent
public boolean isEquivalent(TaggedProfile prof)
Description copied from interface:TaggedProfileReturn true is prof is equivalent to this TaggedProfile. This means that this and prof are indistinguishable for the purposes of remote invocation. Typically this means that the profile data is identical and both profiles contain exactly the same components (if components are applicable). isEquivalent( prof ) should imply that getObjectId().equals( prof.getObjectId() ) is true, and so is getObjectKeyTemplate().equals( prof.getObjectKeyTemplate() ).- Specified by:
isEquivalentin interfaceTaggedProfile- Parameters:
prof- profile to compare with- Returns:
- true if they are equivalent
-
getObjectKey
public ObjectKey getObjectKey()
- Specified by:
getObjectKeyin interfaceTaggedProfile
-
getIOPProfile
public TaggedProfile getIOPProfile()
Description copied from interface:TaggedProfileReturn the TaggedProfile as a CDR encapsulation in the standard format. This is required for Portable interceptors.- Specified by:
getIOPProfilein interfaceTaggedProfile- Returns:
- the tagged profile
-
uncachedGetCodeBase
private java.lang.String uncachedGetCodeBase()
-
getCodebase
public java.lang.String getCodebase()
Description copied from interface:IIOPProfileReturn the Codebase of this profile. Caches the result.- Specified by:
getCodebasein interfaceIIOPProfile- Returns:
- the profile codebase
-
getORBVersion
public ORBVersion getORBVersion()
- Specified by:
getORBVersionin interfaceIIOPProfile- Returns:
- the ORBVersion associated with the object key in the IOR.
-
computingIsLocal
@InfoMethod private void computingIsLocal(java.lang.String host, int scid, int sid, int port)
-
isLocalResults
@InfoMethod private void isLocalResults(boolean isLocalHost, boolean isLocalServerId, boolean isLocalPort)
-
isLocal
public boolean isLocal()
Description copied from interface:TaggedProfileReturn true if this TaggedProfile was created in orb. Caches the result.- Specified by:
isLocalin interfaceTaggedProfile- Returns:
- if this TaggedProfile was created in orb
-
isForeignObject
private boolean isForeignObject()
-
getServant
public java.lang.Object getServant()
Return the servant for this IOR, if it is local AND if the OA that implements this objref supports direct access to servants outside of an invocation.- Specified by:
getServantin interfaceIIOPProfile- Returns:
- the profile servant
-
getGIOPVersion
public GIOPVersion getGIOPVersion()
Return GIOPVersion for this IOR. Requests created against this IOR will be of the return Version.- Specified by:
getGIOPVersionin interfaceIIOPProfile- Returns:
- the GIOPVersion
-
makeImmutable
public void makeImmutable()
- Specified by:
makeImmutablein interfaceMakeImmutable
-
-