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 GIOPVersiongiopVersionprivate ORBorbprivate IIOPAddressprimary-
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 TaggedProfilecreate(ObjectKeyTemplate oktemp, ObjectId id)Create a TaggedProfile from this template.booleanequals(java.lang.Object obj)GIOPVersiongetGIOPVersion()Return the GIOP version of this profile.java.lang.StringgetHost()intgetId()Return the (type) identity of this entity.intgetPort()IIOPAddressgetPrimaryAddress()Return the IIOP address from the IIOP profile.SocketInfogetPrimarySocketInfo()Returns the description of a socket to create to access the associated endpoint.java.util.Iterator<TaggedComponent>getTaggedComponents()java.lang.StringgetType()inthashCode()booleanisEquivalent(TaggedProfileTemplate temp)Return true if temp is equivalent to this template.private booleanisSslTaggedComponent(TaggedComponent component)java.lang.StringtoString()voidwrite(ObjectKeyTemplate okeyTemplate, ObjectId id, OutputStream os)Write the profile create( oktemp, id ) to the OutputStream os.voidwriteContents(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:
getTaggedComponentsin interfaceTaggedProfileTemplate
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.util.AbstractCollection<TaggedComponent>
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacejava.util.Collection<TaggedComponent>- Specified by:
equalsin interfacejava.util.List<TaggedComponent>- Overrides:
equalsin classFreezableList<TaggedComponent>
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejava.util.Collection<TaggedComponent>- Specified by:
hashCodein interfacejava.util.List<TaggedComponent>- Overrides:
hashCodein classFreezableList<TaggedComponent>
-
create
public TaggedProfile create(ObjectKeyTemplate oktemp, ObjectId id)
Description copied from interface:TaggedProfileTemplateCreate a TaggedProfile from this template.- Specified by:
createin interfaceTaggedProfileTemplate- Parameters:
oktemp- template to create fromid- id of object- Returns:
- created TaggedProfile
-
getGIOPVersion
public GIOPVersion getGIOPVersion()
Description copied from interface:IIOPProfileTemplateReturn the GIOP version of this profile.- Specified by:
getGIOPVersionin interfaceIIOPProfileTemplate- Returns:
- the GIOP version
-
getPrimaryAddress
public IIOPAddress getPrimaryAddress()
Description copied from interface:IIOPProfileTemplateReturn the IIOP address from the IIOP profile. This is called the primary address here since other addresses may be contained in components.- Specified by:
getPrimaryAddressin 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:IIOPProfileTemplateReturns the description of a socket to create to access the associated endpoint. Its host and port will match the primary address- Specified by:
getPrimarySocketInfoin interfaceIIOPProfileTemplate- Returns:
- a description of a socket.
-
getType
public java.lang.String getType()
- Specified by:
getTypein interfaceSocketInfo
-
isSslTaggedComponent
private boolean isSslTaggedComponent(TaggedComponent component)
-
getHost
public java.lang.String getHost()
- Specified by:
getHostin interfaceSocketInfo
-
getPort
public int getPort()
- Specified by:
getPortin interfaceSocketInfo
-
write
public void write(ObjectKeyTemplate okeyTemplate, ObjectId id, OutputStream os)
Description copied from interface:TaggedProfileTemplateWrite the profile create( oktemp, id ) to the OutputStream os.- Specified by:
writein 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:
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(TaggedProfileTemplate temp)
Description copied from interface:TaggedProfileTemplateReturn 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:
isEquivalentin interfaceTaggedProfileTemplate- Parameters:
temp- template to compare with- Returns:
- true if they are equivalent
-
-