java.lang.Objectjavax.rmi.CORBA.Util
public class Util
Provides utility methods that can be used by stubs and ties to perform common operations.
| Method Summary | |
|---|---|
static Object |
copyObject(Object obj,
ORB orb)
Copies or connects an object. |
static Object[] |
copyObjects(Object[] obj,
ORB orb)
Copies or connects an array of objects. |
static ValueHandler |
createValueHandler()
Returns a singleton instance of a class that implements the ValueHandler interface. |
static String |
getCodebase(Class clz)
Returns the codebase, if any, for the given class. |
static Tie |
getTie(Remote target)
Returns the tie (if any) for a given target object. |
static boolean |
isLocal(Stub stub)
The isLocal method has the same semantics as the ObjectImpl._is_local method, except that it can throw a RemoteException. |
static Class |
loadClass(String className,
String remoteCodebase,
ClassLoader loader)
Returns a class instance for the specified class. |
static RemoteException |
mapSystemException(SystemException ex)
Maps a SystemException to a RemoteException. |
static Object |
readAny(InputStream in)
Reads a java.lang.Object as a CORBA any. |
static void |
registerTarget(Tie tie,
Remote target)
Registers a target for a tie. |
static void |
unexportObject(Remote target)
Removes the associated tie from an internal table and calls Tie.deactivate()
to deactivate the object. |
static RemoteException |
wrapException(Throwable orig)
Wraps an exception thrown by an implementation method. |
static void |
writeAbstractObject(OutputStream out,
Object obj)
Writes a java.lang.Object as either a value or a CORBA Object. |
static void |
writeAny(OutputStream out,
Object obj)
Writes any java.lang.Object as a CORBA any. |
static void |
writeRemoteObject(OutputStream out,
Object obj)
Writes a java.lang.Object as a CORBA Object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static RemoteException mapSystemException(SystemException ex)
ex - the SystemException to map.
public static void writeAny(OutputStream out, Object obj)
out - the stream in which to write the any.obj - the object to write as an any.public static Object readAny(InputStream in)
in - the stream from which to read the any.
public static void writeRemoteObject(OutputStream out, Object obj)
obj is
an exported RMI-IIOP server object, the tie is found
and wired to obj, then written to
out.write_Object(org.omg.CORBA.Object).
If obj is a CORBA Object, it is written to
out.write_Object(org.omg.CORBA.Object).
out - the stream in which to write the object.obj - the object to write.public static void writeAbstractObject(OutputStream out, Object obj)
obj is a value object or a stub object, it is written to
out.write_abstract_interface(java.lang.Object). If obj
is
an exported
RMI-IIOP server object, the tie is found and wired to obj,
then written to out.write_abstract_interface(java.lang.Object).
out - the stream in which to write the object.obj - the object to write.public static void registerTarget(Tie tie, Remote target)
Tie.setTarget(java.rmi.Remote) on the tie object.
tie - the tie to register.target - the target for the tie.public static void unexportObject(Remote target) throws NoSuchObjectException
Tie.deactivate()
to deactivate the object.
target - the object to unexport.
NoSuchObjectExceptionpublic static Tie getTie(Remote target)
public static ValueHandler createValueHandler()
ValueHandler interface.
public static String getCodebase(Class clz)
clz - the class to get a codebase for.
public static Class loadClass(String className, String remoteCodebase, ClassLoader loader) throws ClassNotFoundException
The spec for this method is the "Java to IDL language mapping", ptc/00-01-06.
In Java 2 Platform, this method works as follows:
className - the name of the class.remoteCodebase - a space-separated list of URLs at which
the class might be found. May be null.loader - a ClassLoader that may be used to
load the class if all other methods fail.
Class object representing the loaded class.
ClassNotFoundException - if class cannot be loaded.public static boolean isLocal(Stub stub) throws RemoteException
stub - the stub to test.
RemoteException - The Java to IDL specification does not
specify the conditions that cause a RemoteException to be thrown.public static RemoteException wrapException(Throwable orig)
orig - the exception to wrap.
public static Object[] copyObjects(Object[] obj, ORB orb) throws RemoteException
obj - the objects to copy or connect.orb - the ORB.
RemoteException - if any object could not be copied or connected.public static Object copyObject(Object obj, ORB orb) throws RemoteException
obj - the object to copy.orb - the ORB.
RemoteException - if the object could not be copied or connected.Ces informations proviennent du site de http://java.sun.com
Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :
Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.
Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.
Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.
Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.
Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.
Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.
7 mots clés dont 0 définis manuellement (plus d'information...).
Avertissement
Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.
Recherche (afficher)
Utilisateur (masquer)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
Citation (masquer)