Package com.sun.corba.ee.impl.ior
Class ObjectKeyTemplateBase
- java.lang.Object
-
- com.sun.corba.ee.impl.ior.ObjectKeyTemplateBase
-
- All Implemented Interfaces:
ObjectKeyTemplate,Writeable
- Direct Known Subclasses:
NewObjectKeyTemplateBase,OldObjectKeyTemplateBase
public abstract class ObjectKeyTemplateBase extends java.lang.Object implements ObjectKeyTemplate
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]adapterIdstatic ObjectAdapterIdJIDL_OAIDprivate static java.lang.String[]JIDL_OAID_STRINGSstatic java.lang.StringJIDL_ORB_IDprivate intmagicprivate ObjectAdapterIdoaidprivate ORBorbprivate java.lang.Stringorbidprivate intscidprivate intserveridprivate ORBVersionversionprotected static IORSystemExceptionwrapper
-
Constructor Summary
Constructors Constructor Description ObjectKeyTemplateBase(ORB orb, int magic, int scid, int serverid, java.lang.String orbid, ObjectAdapterId oaid)This constructor reads a complete ObjectKey (template and Id) from the stream.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private byte[]computeAdapterId()booleanequals(java.lang.Object obj)byte[]getAdapterId()Compute an adapter ID for this template than includes all of the template information.protected intgetMagic()ObjectAdapterIdgetObjectAdapterId()Return the object adapter ID for this template.java.lang.StringgetORBId()Return the ORB ID for this template.ORBVersiongetORBVersion()intgetServerId()Return the server ID for this template.ServerRequestDispatchergetServerRequestDispatcher(ObjectId id)intgetSubcontractId()An ID used to determine how to perform operations on this ObjectKeyTemplate.inthashCode()protected byte[]readObjectKey(InputStream is)voidsetORBVersion(ORBVersion version)java.lang.StringtoString()voidwrite(ObjectId objectId, OutputStream os)voidwrite(OutputStream os)Write this object directly to the output stream.protected abstract voidwriteTemplate(OutputStream os)
-
-
-
Field Detail
-
wrapper
protected static final IORSystemException wrapper
-
JIDL_ORB_ID
public static final java.lang.String JIDL_ORB_ID
- See Also:
- Constant Field Values
-
JIDL_OAID_STRINGS
private static final java.lang.String[] JIDL_OAID_STRINGS
-
JIDL_OAID
public static final ObjectAdapterId JIDL_OAID
-
orb
private ORB orb
-
version
private ORBVersion version
-
magic
private int magic
-
scid
private int scid
-
serverid
private int serverid
-
orbid
private java.lang.String orbid
-
oaid
private ObjectAdapterId oaid
-
adapterId
private byte[] adapterId
-
-
Constructor Detail
-
ObjectKeyTemplateBase
public ObjectKeyTemplateBase(ORB orb, int magic, int scid, int serverid, java.lang.String orbid, ObjectAdapterId oaid)
This constructor reads a complete ObjectKey (template and Id) from the stream.- Parameters:
orb- ORB to usemagic- Magic numberscid- ID of the Objectserverid- server IDorbid- orbidoaid- oaid
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getAdapterId
public byte[] getAdapterId()
Description copied from interface:ObjectKeyTemplateCompute an adapter ID for this template than includes all of the template information. This value is cached to avoid the expense of recomputing it.- Specified by:
getAdapterIdin interfaceObjectKeyTemplate- Returns:
- adapter ID for this template
-
computeAdapterId
private byte[] computeAdapterId()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getSubcontractId
public int getSubcontractId()
Description copied from interface:ObjectKeyTemplateAn ID used to determine how to perform operations on this ObjectKeyTemplate. This id determines how to process requests on this object reference, and what object adapter type to use.- Specified by:
getSubcontractIdin interfaceObjectKeyTemplate- Returns:
- The subcontract ID
-
getServerId
public int getServerId()
Description copied from interface:ObjectKeyTemplateReturn the server ID for this template. For CORBA 3.0, this should be a String, but it is currently an int in the object key template.- Specified by:
getServerIdin interfaceObjectKeyTemplate- Returns:
- The ID of the server that handles requests to this IOR"
-
getORBId
public java.lang.String getORBId()
Description copied from interface:ObjectKeyTemplateReturn the ORB ID for this template.- Specified by:
getORBIdin interfaceObjectKeyTemplate- Returns:
- the ORB ID that created this IOR
-
getObjectAdapterId
public ObjectAdapterId getObjectAdapterId()
Description copied from interface:ObjectKeyTemplateReturn the object adapter ID for this template.- Specified by:
getObjectAdapterIdin interfaceObjectKeyTemplate- Returns:
- The ObjectAdapterId that identifies the ObjectAdapter that created this IOR
-
write
public void write(ObjectId objectId, OutputStream os)
- Specified by:
writein interfaceObjectKeyTemplate
-
write
public void write(OutputStream os)
Description copied from interface:WriteableWrite this object directly to the output stream.
-
writeTemplate
protected abstract void writeTemplate(OutputStream os)
-
getMagic
protected int getMagic()
-
setORBVersion
public void setORBVersion(ORBVersion version)
-
getORBVersion
public ORBVersion getORBVersion()
- Specified by:
getORBVersionin interfaceObjectKeyTemplate
-
readObjectKey
protected byte[] readObjectKey(InputStream is)
-
getServerRequestDispatcher
public ServerRequestDispatcher getServerRequestDispatcher(ObjectId id)
- Specified by:
getServerRequestDispatcherin interfaceObjectKeyTemplate
-
-