Class EntryRep

java.lang.Object
com.sun.jini.reggie.EntryRep
All Implemented Interfaces:
Serializable, Cloneable

public class EntryRep extends Object implements Serializable, Cloneable
An EntryRep contains the fields of an Entry packaged up for transmission between client-side proxies and the registrar server. Instances are never visible to clients, they are private to the communication between the proxies and the server.

This class only has a bare minimum of methods, to minimize the amount of code downloaded into clients.

Author:
Sun Microsystems, Inc.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The codebase of the entry class.
    The Class of the Entry converted to EntryClass.
    The public fields of the Entry, each converted as necessary to a MarshalledWrapper (or left as is if of known java.lang immutable type).
  • Constructor Summary

    Constructors
    Constructor
    Description
    EntryRep(Entry entry)
    Converts an Entry to an EntryRep.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deep clone (which just means cloning the fields array too).
    boolean
    EntryReps are equal if they have the same class and the fields are pairwise equal.
    get()
    Convert back to an Entry.
    int
     
    static Entry[]
    toEntry(EntryRep[] reps)
    Converts an array of EntryRep to an array of Entry.
    static EntryRep[]
    toEntryRep(Entry[] entries, boolean needCodebase)
    Converts an array of Entry to an array of EntryRep.
     

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • eclass

      public EntryClass eclass
      The Class of the Entry converted to EntryClass.
    • codebase

      public String codebase
      The codebase of the entry class.
    • fields

      public Object[] fields
      The public fields of the Entry, each converted as necessary to a MarshalledWrapper (or left as is if of known java.lang immutable type). The fields are in super- to subclass order.
  • Constructor Details

    • EntryRep

      public EntryRep(Entry entry) throws RemoteException
      Converts an Entry to an EntryRep. Any exception that results is bundled up into a MarshalException.
      Throws:
      RemoteException
  • Method Details

    • get

      public Entry get()
      Convert back to an Entry. If the Entry cannot be constructed, null is returned. If a field cannot be unmarshalled, it is set to null.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      EntryReps are equal if they have the same class and the fields are pairwise equal. This is really only needed in the server, but it's very convenient to have here.
      Overrides:
      equals in class Object
    • clone

      public Object clone()
      Deep clone (which just means cloning the fields array too). This is really only needed in the server, but it's very convenient to have here.
      Overrides:
      clone in class Object
    • toEntryRep

      public static EntryRep[] toEntryRep(Entry[] entries, boolean needCodebase) throws RemoteException
      Converts an array of Entry to an array of EntryRep. If needCodebase is false, then the codebase of every EntryRep will be null.
      Throws:
      RemoteException
    • toEntry

      public static Entry[] toEntry(EntryRep[] reps)
      Converts an array of EntryRep to an array of Entry.