GigaSpaces XAP 9.7.2 API

com.sun.jini.reggie
Class EntryRep

java.lang.Object
  extended by 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:
Serialized Form

Field Summary
 String codebase
          The codebase of the entry class.
 EntryClass eclass
          The Class of the Entry converted to EntryClass.
 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).
 
Constructor Summary
EntryRep(Entry entry)
          Converts an Entry to an EntryRep.
 
Method Summary
 Object clone()
          Deep clone (which just means cloning the fields array too).
 boolean equals(Object obj)
          EntryReps are equal if they have the same class and the fields are pairwise equal.
 Entry get()
          Convert back to an Entry.
 int hashCode()
           
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.
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

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 Detail

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 Detail

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.


GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.