Package com.sun.corba.ee.impl.ior.iiop
Class IIOPProfileTemplateImpl
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- com.sun.corba.ee.impl.ior.FreezableList<E>
-
- com.sun.corba.ee.spi.ior.IdentifiableContainerBase<TaggedComponent>
-
- com.sun.corba.ee.spi.ior.TaggedProfileTemplateBase
-
- com.sun.corba.ee.impl.ior.iiop.IIOPProfileTemplateImpl
-
- All Implemented Interfaces:
Identifiable
,IIOPProfileTemplate
,MakeImmutable
,TaggedProfileTemplate
,Writeable
,WriteContents
,SocketInfo
,java.lang.Iterable<TaggedComponent>
,java.util.Collection<TaggedComponent>
,java.util.List<TaggedComponent>
- Direct Known Subclasses:
VirtualAddressAgentImpl.SpecialIIOPProfileTemplateImpl
public class IIOPProfileTemplateImpl extends TaggedProfileTemplateBase implements IIOPProfileTemplate, SocketInfo
-
-
Field Summary
Fields Modifier and Type Field Description private GIOPVersion
giopVersion
private ORB
orb
private IIOPAddress
primary
-
Fields inherited from interface com.sun.corba.ee.spi.transport.SocketInfo
IIOP_CLEAR_TEXT, SSL_PREFIX
-
-
Constructor Summary
Constructors Constructor Description IIOPProfileTemplateImpl(ORB orb, GIOPVersion version, IIOPAddress primary)
IIOPProfileTemplateImpl(InputStream istr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TaggedProfile
create(ObjectKeyTemplate oktemp, ObjectId id)
Create a TaggedProfile from this template.boolean
equals(java.lang.Object obj)
GIOPVersion
getGIOPVersion()
Return the GIOP version of this profile.java.lang.String
getHost()
int
getId()
Return the (type) identity of this entity.int
getPort()
IIOPAddress
getPrimaryAddress()
Return the IIOP address from the IIOP profile.SocketInfo
getPrimarySocketInfo()
Returns the description of a socket to create to access the associated endpoint.java.util.Iterator<TaggedComponent>
getTaggedComponents()
java.lang.String
getType()
int
hashCode()
boolean
isEquivalent(TaggedProfileTemplate temp)
Return true if temp is equivalent to this template.private boolean
isSslTaggedComponent(TaggedComponent component)
java.lang.String
toString()
void
write(ObjectKeyTemplate okeyTemplate, ObjectId id, OutputStream os)
Write the profile create( oktemp, id ) to the OutputStream os.void
writeContents(OutputStream os)
Write out this IIOPProfileTemplateImpl only.-
Methods inherited from class com.sun.corba.ee.spi.ior.TaggedProfileTemplateBase
getIOPComponents, iteratorById, write
-
Methods inherited from class com.sun.corba.ee.spi.ior.IdentifiableContainerBase
iteratorById
-
Methods inherited from class com.sun.corba.ee.impl.ior.FreezableList
add, get, isImmutable, makeElementsImmutable, makeImmutable, remove, set, size, subList
-
Methods inherited from class java.util.AbstractList
add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
Methods inherited from interface com.sun.corba.ee.spi.ior.MakeImmutable
makeImmutable
-
Methods inherited from interface com.sun.corba.ee.spi.ior.TaggedProfileTemplate
getIOPComponents, iteratorById, iteratorById
-
-
-
-
Field Detail
-
orb
private ORB orb
-
giopVersion
private GIOPVersion giopVersion
-
primary
private IIOPAddress primary
-
-
Constructor Detail
-
IIOPProfileTemplateImpl
public IIOPProfileTemplateImpl(ORB orb, GIOPVersion version, IIOPAddress primary)
-
IIOPProfileTemplateImpl
public IIOPProfileTemplateImpl(InputStream istr)
-
-
Method Detail
-
getTaggedComponents
public java.util.Iterator<TaggedComponent> getTaggedComponents()
- Specified by:
getTaggedComponents
in interfaceTaggedProfileTemplate
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.util.AbstractCollection<TaggedComponent>
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfacejava.util.Collection<TaggedComponent>
- Specified by:
equals
in interfacejava.util.List<TaggedComponent>
- Overrides:
equals
in classFreezableList<TaggedComponent>
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejava.util.Collection<TaggedComponent>
- Specified by:
hashCode
in interfacejava.util.List<TaggedComponent>
- Overrides:
hashCode
in classFreezableList<TaggedComponent>
-
create
public TaggedProfile create(ObjectKeyTemplate oktemp, ObjectId id)
Description copied from interface:TaggedProfileTemplate
Create a TaggedProfile from this template.- Specified by:
create
in interfaceTaggedProfileTemplate
- Parameters:
oktemp
- template to create fromid
- id of object- Returns:
- created TaggedProfile
-
getGIOPVersion
public GIOPVersion getGIOPVersion()
Description copied from interface:IIOPProfileTemplate
Return the GIOP version of this profile.- Specified by:
getGIOPVersion
in interfaceIIOPProfileTemplate
- Returns:
- the GIOP version
-
getPrimaryAddress
public IIOPAddress getPrimaryAddress()
Description copied from interface:IIOPProfileTemplate
Return the IIOP address from the IIOP profile. This is called the primary address here since other addresses may be contained in components.- Specified by:
getPrimaryAddress
in interfaceIIOPProfileTemplate
- Returns:
- The host and port of the IP address for the primary endpoint of this profile
-
getPrimarySocketInfo
public SocketInfo getPrimarySocketInfo()
Description copied from interface:IIOPProfileTemplate
Returns the description of a socket to create to access the associated endpoint. Its host and port will match the primary address- Specified by:
getPrimarySocketInfo
in interfaceIIOPProfileTemplate
- Returns:
- a description of a socket.
-
getType
public java.lang.String getType()
- Specified by:
getType
in interfaceSocketInfo
-
isSslTaggedComponent
private boolean isSslTaggedComponent(TaggedComponent component)
-
getHost
public java.lang.String getHost()
- Specified by:
getHost
in interfaceSocketInfo
-
getPort
public int getPort()
- Specified by:
getPort
in interfaceSocketInfo
-
write
public void write(ObjectKeyTemplate okeyTemplate, ObjectId id, OutputStream os)
Description copied from interface:TaggedProfileTemplate
Write the profile create( oktemp, id ) to the OutputStream os.- Specified by:
write
in interfaceTaggedProfileTemplate
- Parameters:
okeyTemplate
- template to create fromid
- id of objectos
- stream to write to- See Also:
TaggedProfileTemplate.create(com.sun.corba.ee.spi.ior.ObjectKeyTemplate, com.sun.corba.ee.spi.ior.ObjectId)
-
writeContents
public void writeContents(OutputStream os)
Write out this IIOPProfileTemplateImpl only.- Specified by:
writeContents
in interfaceWriteContents
-
getId
public int getId()
Description copied from interface:Identifiable
Return the (type) identity of this entity.- Specified by:
getId
in interfaceIdentifiable
- Returns:
- int
-
isEquivalent
public boolean isEquivalent(TaggedProfileTemplate temp)
Description copied from interface:TaggedProfileTemplate
Return true if temp is equivalent to this template. Equivalence means that in some sense an invocation on a profile created by this template has the same results as an invocation on a profile created from temp. Equivalence may be weaker than equality.- Specified by:
isEquivalent
in interfaceTaggedProfileTemplate
- Parameters:
temp
- template to compare with- Returns:
- true if they are equivalent
-
-