diff options
Diffstat (limited to 'libjava/gnu/java/rmi')
49 files changed, 2315 insertions, 1833 deletions
diff --git a/libjava/gnu/java/rmi/RMIMarshalledObjectInputStream.h b/libjava/gnu/java/rmi/RMIMarshalledObjectInputStream.h new file mode 100644 index 00000000000..ad170da547c --- /dev/null +++ b/libjava/gnu/java/rmi/RMIMarshalledObjectInputStream.h @@ -0,0 +1,39 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_RMIMarshalledObjectInputStream__ +#define __gnu_java_rmi_RMIMarshalledObjectInputStream__ + +#pragma interface + +#include <gnu/java/rmi/server/RMIObjectInputStream.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + class RMIMarshalledObjectInputStream; + } + } + } +} + +class gnu::java::rmi::RMIMarshalledObjectInputStream : public ::gnu::java::rmi::server::RMIObjectInputStream +{ + +public: + RMIMarshalledObjectInputStream(JArray< jbyte > *, JArray< jbyte > *); +public: // actually protected + virtual ::java::lang::Object * getAnnotation(); +private: + ::java::io::ObjectInputStream * __attribute__((aligned(__alignof__( ::gnu::java::rmi::server::RMIObjectInputStream)))) locStream; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_RMIMarshalledObjectInputStream__ diff --git a/libjava/gnu/java/rmi/RMIMarshalledObjectOutputStream.h b/libjava/gnu/java/rmi/RMIMarshalledObjectOutputStream.h new file mode 100644 index 00000000000..6a1c87e367f --- /dev/null +++ b/libjava/gnu/java/rmi/RMIMarshalledObjectOutputStream.h @@ -0,0 +1,43 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_RMIMarshalledObjectOutputStream__ +#define __gnu_java_rmi_RMIMarshalledObjectOutputStream__ + +#pragma interface + +#include <gnu/java/rmi/server/RMIObjectOutputStream.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + class RMIMarshalledObjectOutputStream; + } + } + } +} + +class gnu::java::rmi::RMIMarshalledObjectOutputStream : public ::gnu::java::rmi::server::RMIObjectOutputStream +{ + +public: + RMIMarshalledObjectOutputStream(::java::io::OutputStream *); +public: // actually protected + virtual void setAnnotation(::java::lang::String *); +public: + virtual void flush(); + virtual JArray< jbyte > * getLocBytes(); +private: + ::java::io::ObjectOutputStream * __attribute__((aligned(__alignof__( ::gnu::java::rmi::server::RMIObjectOutputStream)))) locStream; + ::java::io::ByteArrayOutputStream * locBytesStream; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_RMIMarshalledObjectOutputStream__ diff --git a/libjava/gnu/java/rmi/activation/ActivationSystemTransient.h b/libjava/gnu/java/rmi/activation/ActivationSystemTransient.h new file mode 100644 index 00000000000..81607a34f86 --- /dev/null +++ b/libjava/gnu/java/rmi/activation/ActivationSystemTransient.h @@ -0,0 +1,80 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_activation_ActivationSystemTransient__ +#define __gnu_java_rmi_activation_ActivationSystemTransient__ + +#pragma interface + +#include <gnu/java/rmi/activation/DefaultActivationSystem.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace activation + { + class ActivationSystemTransient; + class BidiTable; + } + } + } + } + namespace java + { + namespace rmi + { + class MarshalledObject; + namespace activation + { + class ActivationDesc; + class ActivationGroupDesc; + class ActivationGroupID; + class ActivationID; + class ActivationInstantiator; + class ActivationMonitor; + class ActivationSystem; + } + } + } +} + +class gnu::java::rmi::activation::ActivationSystemTransient : public ::gnu::java::rmi::activation::DefaultActivationSystem +{ + +public: // actually protected + ActivationSystemTransient(::gnu::java::rmi::activation::BidiTable *, ::gnu::java::rmi::activation::BidiTable *); + ActivationSystemTransient(); +public: + static ::java::rmi::activation::ActivationSystem * getInstance(); + virtual ::java::rmi::MarshalledObject * activate(::java::rmi::activation::ActivationID *, jboolean); + virtual ::java::rmi::activation::ActivationMonitor * activeGroup(::java::rmi::activation::ActivationGroupID *, ::java::rmi::activation::ActivationInstantiator *, jlong); + virtual ::java::rmi::activation::ActivationDesc * getActivationDesc(::java::rmi::activation::ActivationID *); + virtual ::java::rmi::activation::ActivationGroupDesc * getActivationGroupDesc(::java::rmi::activation::ActivationGroupID *); + virtual ::java::rmi::activation::ActivationGroupID * registerGroup(::java::rmi::activation::ActivationGroupDesc *); + virtual ::java::rmi::activation::ActivationID * registerObject(::java::rmi::activation::ActivationDesc *); + virtual ::java::rmi::activation::ActivationDesc * setActivationDesc(::java::rmi::activation::ActivationID *, ::java::rmi::activation::ActivationDesc *); + virtual ::java::rmi::activation::ActivationGroupDesc * setActivationGroupDesc(::java::rmi::activation::ActivationGroupID *, ::java::rmi::activation::ActivationGroupDesc *); + virtual void shutdown(); + virtual void unregisterGroup(::java::rmi::activation::ActivationGroupID *); + virtual void unregisterObject(::java::rmi::activation::ActivationID *); + virtual void activeObject(::java::rmi::activation::ActivationID *, ::java::rmi::MarshalledObject *); + virtual void inactiveGroup(::java::rmi::activation::ActivationGroupID *, jlong); + virtual void inactiveObject(::java::rmi::activation::ActivationID *); +public: // actually protected + ::gnu::java::rmi::activation::BidiTable * __attribute__((aligned(__alignof__( ::gnu::java::rmi::activation::DefaultActivationSystem)))) groupDescs; + ::gnu::java::rmi::activation::BidiTable * descriptions; + ::java::util::Map * groupInstantiators; + ::java::util::Map * activatedObjects; +public: // actually package-private + static jlong groupIncarnations; + static ::java::rmi::activation::ActivationSystem * singleton; +public: + static jboolean debug; + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_activation_ActivationSystemTransient__ diff --git a/libjava/gnu/java/rmi/activation/BidiTable.h b/libjava/gnu/java/rmi/activation/BidiTable.h new file mode 100644 index 00000000000..74a78f11ade --- /dev/null +++ b/libjava/gnu/java/rmi/activation/BidiTable.h @@ -0,0 +1,54 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_activation_BidiTable__ +#define __gnu_java_rmi_activation_BidiTable__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace activation + { + class BidiTable; + } + } + } + } +} + +class gnu::java::rmi::activation::BidiTable : public ::java::lang::Object +{ + +public: + BidiTable(); +public: // actually protected + BidiTable(jint); +public: + virtual ::java::lang::Object * getKey(::java::lang::Object *); + virtual void put(::java::lang::Object *, ::java::lang::Object *); + virtual ::java::lang::Object * get(::java::lang::Object *); + virtual void removeKey(::java::lang::Object *); + virtual jboolean containsKey(::java::lang::Object *); + virtual void shutdown(); + virtual jint size(); + virtual JArray< ::java::lang::Object * > * keys(); +private: + static const jlong serialVersionUID = 1LL; +public: // actually protected + ::java::util::Map * __attribute__((aligned(__alignof__( ::java::lang::Object)))) k2v; + ::java::util::Map * v2k; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_activation_BidiTable__ diff --git a/libjava/gnu/java/rmi/activation/DefaultActivationGroup.h b/libjava/gnu/java/rmi/activation/DefaultActivationGroup.h new file mode 100644 index 00000000000..2f1cb0eec97 --- /dev/null +++ b/libjava/gnu/java/rmi/activation/DefaultActivationGroup.h @@ -0,0 +1,58 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_activation_DefaultActivationGroup__ +#define __gnu_java_rmi_activation_DefaultActivationGroup__ + +#pragma interface + +#include <java/rmi/activation/ActivationGroup.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace activation + { + class DefaultActivationGroup; + } + } + } + } + namespace java + { + namespace rmi + { + class MarshalledObject; + class Remote; + namespace activation + { + class ActivationDesc; + class ActivationGroupID; + class ActivationID; + } + } + } +} + +class gnu::java::rmi::activation::DefaultActivationGroup : public ::java::rmi::activation::ActivationGroup +{ + +public: + DefaultActivationGroup(::java::rmi::activation::ActivationGroupID *, ::java::rmi::MarshalledObject *); + virtual void activeObject(::java::rmi::activation::ActivationID *, ::java::rmi::Remote *); + virtual ::java::rmi::MarshalledObject * newInstance(::java::rmi::activation::ActivationID *, ::java::rmi::activation::ActivationDesc *); +private: + static const jlong serialVersionUID = 1LL; +public: // actually package-private + static JArray< ::java::lang::Class * > * cConstructorTypes; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_activation_DefaultActivationGroup__ diff --git a/libjava/gnu/java/rmi/activation/DefaultActivationSystem.h b/libjava/gnu/java/rmi/activation/DefaultActivationSystem.h new file mode 100644 index 00000000000..457c112ede1 --- /dev/null +++ b/libjava/gnu/java/rmi/activation/DefaultActivationSystem.h @@ -0,0 +1,52 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_activation_DefaultActivationSystem__ +#define __gnu_java_rmi_activation_DefaultActivationSystem__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace activation + { + class DefaultActivationSystem; + } + } + } + } + namespace java + { + namespace rmi + { + namespace activation + { + class ActivationSystem; + } + } + } +} + +class gnu::java::rmi::activation::DefaultActivationSystem : public ::java::lang::Object +{ + +public: + DefaultActivationSystem(); + static ::java::rmi::activation::ActivationSystem * get(); +public: // actually package-private + static ::java::rmi::activation::ActivationSystem * system; + static jint ACTIVATION_REGISTRY_PORT; + static ::java::lang::String * AS_PORT_PROPERTY; + static ::java::lang::String * ACTIVATION_SYSTEM_NAME; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_activation_DefaultActivationSystem__ diff --git a/libjava/gnu/java/rmi/dgc/DGCImpl$RefProtector.h b/libjava/gnu/java/rmi/dgc/DGCImpl$RefProtector.h new file mode 100644 index 00000000000..ed869a29027 --- /dev/null +++ b/libjava/gnu/java/rmi/dgc/DGCImpl$RefProtector.h @@ -0,0 +1,54 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_dgc_DGCImpl$RefProtector__ +#define __gnu_java_rmi_dgc_DGCImpl$RefProtector__ + +#pragma interface + +#include <java/util/TimerTask.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace dgc + { + class DGCImpl; + class DGCImpl$RefProtector; + } + } + } + } + namespace java + { + namespace rmi + { + namespace server + { + class ObjID; + } + } + } +} + +class gnu::java::rmi::dgc::DGCImpl$RefProtector : public ::java::util::TimerTask +{ + +public: // actually package-private + DGCImpl$RefProtector(::gnu::java::rmi::dgc::DGCImpl *, JArray< ::java::rmi::server::ObjID * > *, jlong); +public: + virtual void run(); +public: // actually package-private + JArray< ::java::util::Collection * > * __attribute__((aligned(__alignof__( ::java::util::TimerTask)))) references; + ::gnu::java::rmi::dgc::DGCImpl * this$0; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_dgc_DGCImpl$RefProtector__ diff --git a/libjava/gnu/java/rmi/dgc/DGCImpl.h b/libjava/gnu/java/rmi/dgc/DGCImpl.h new file mode 100644 index 00000000000..e0f91a1990e --- /dev/null +++ b/libjava/gnu/java/rmi/dgc/DGCImpl.h @@ -0,0 +1,59 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_dgc_DGCImpl__ +#define __gnu_java_rmi_dgc_DGCImpl__ + +#pragma interface + +#include <gnu/java/rmi/server/UnicastServerRef.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace dgc + { + class DGCImpl; + } + } + } + } + namespace java + { + namespace rmi + { + namespace dgc + { + class Lease; + class VMID; + } + namespace server + { + class ObjID; + } + } + } +} + +class gnu::java::rmi::dgc::DGCImpl : public ::gnu::java::rmi::server::UnicastServerRef +{ + +public: + DGCImpl(); + virtual ::java::rmi::dgc::Lease * dirty(JArray< ::java::rmi::server::ObjID * > *, jlong, ::java::rmi::dgc::Lease *); + virtual void clean(JArray< ::java::rmi::server::ObjID * > *, jlong, ::java::rmi::dgc::VMID *, jboolean); +private: + static const jlong serialVersionUID = 1LL; +public: // actually package-private + static const jlong LEASE_VALUE = 600000LL; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_dgc_DGCImpl__ diff --git a/libjava/gnu/java/rmi/dgc/DGCImpl_Skel.h b/libjava/gnu/java/rmi/dgc/DGCImpl_Skel.h new file mode 100644 index 00000000000..3133f2ca453 --- /dev/null +++ b/libjava/gnu/java/rmi/dgc/DGCImpl_Skel.h @@ -0,0 +1,55 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_dgc_DGCImpl_Skel__ +#define __gnu_java_rmi_dgc_DGCImpl_Skel__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace dgc + { + class DGCImpl_Skel; + } + } + } + } + namespace java + { + namespace rmi + { + class Remote; + namespace server + { + class Operation; + class RemoteCall; + } + } + } +} + +class gnu::java::rmi::dgc::DGCImpl_Skel : public ::java::lang::Object +{ + +public: + DGCImpl_Skel(); + JArray< ::java::rmi::server::Operation * > * getOperations(); + void dispatch(::java::rmi::Remote *, ::java::rmi::server::RemoteCall *, jint, jlong); +private: + static const jlong interfaceHash = -669196253586618813LL; + static JArray< ::java::rmi::server::Operation * > * operations; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_dgc_DGCImpl_Skel__ diff --git a/libjava/gnu/java/rmi/dgc/DGCImpl_Stub.h b/libjava/gnu/java/rmi/dgc/DGCImpl_Stub.h new file mode 100644 index 00000000000..f37555ad924 --- /dev/null +++ b/libjava/gnu/java/rmi/dgc/DGCImpl_Stub.h @@ -0,0 +1,65 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_dgc_DGCImpl_Stub__ +#define __gnu_java_rmi_dgc_DGCImpl_Stub__ + +#pragma interface + +#include <java/rmi/server/RemoteStub.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace dgc + { + class DGCImpl_Stub; + } + } + } + } + namespace java + { + namespace rmi + { + namespace dgc + { + class Lease; + class VMID; + } + namespace server + { + class ObjID; + class Operation; + class RemoteRef; + } + } + } +} + +class gnu::java::rmi::dgc::DGCImpl_Stub : public ::java::rmi::server::RemoteStub +{ + +public: + DGCImpl_Stub(); + DGCImpl_Stub(::java::rmi::server::RemoteRef *); + void clean(JArray< ::java::rmi::server::ObjID * > *, jlong, ::java::rmi::dgc::VMID *, jboolean); + ::java::rmi::dgc::Lease * dirty(JArray< ::java::rmi::server::ObjID * > *, jlong, ::java::rmi::dgc::Lease *); +private: + static const jlong serialVersionUID = 2LL; + static const jlong interfaceHash = -669196253586618813LL; + static jboolean useNewInvoke; + static JArray< ::java::rmi::server::Operation * > * operations; + static ::java::lang::reflect::Method * $method_clean_0; + static ::java::lang::reflect::Method * $method_dirty_1; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_dgc_DGCImpl_Stub__ diff --git a/libjava/gnu/java/rmi/dgc/LeaseRenewingTask$LeaseTimerTask.h b/libjava/gnu/java/rmi/dgc/LeaseRenewingTask$LeaseTimerTask.h new file mode 100644 index 00000000000..7d31934041a --- /dev/null +++ b/libjava/gnu/java/rmi/dgc/LeaseRenewingTask$LeaseTimerTask.h @@ -0,0 +1,41 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_dgc_LeaseRenewingTask$LeaseTimerTask__ +#define __gnu_java_rmi_dgc_LeaseRenewingTask$LeaseTimerTask__ + +#pragma interface + +#include <java/util/TimerTask.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace dgc + { + class LeaseRenewingTask; + class LeaseRenewingTask$LeaseTimerTask; + } + } + } + } +} + +class gnu::java::rmi::dgc::LeaseRenewingTask$LeaseTimerTask : public ::java::util::TimerTask +{ + +public: // actually package-private + LeaseRenewingTask$LeaseTimerTask(::gnu::java::rmi::dgc::LeaseRenewingTask *); +public: + virtual void run(); +public: // actually package-private + ::gnu::java::rmi::dgc::LeaseRenewingTask * __attribute__((aligned(__alignof__( ::java::util::TimerTask)))) this$0; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_dgc_LeaseRenewingTask$LeaseTimerTask__ diff --git a/libjava/gnu/java/rmi/dgc/LeaseRenewingTask.h b/libjava/gnu/java/rmi/dgc/LeaseRenewingTask.h new file mode 100644 index 00000000000..506bdcc14dd --- /dev/null +++ b/libjava/gnu/java/rmi/dgc/LeaseRenewingTask.h @@ -0,0 +1,60 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_dgc_LeaseRenewingTask__ +#define __gnu_java_rmi_dgc_LeaseRenewingTask__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace dgc + { + class LeaseRenewingTask; + } + namespace server + { + class UnicastRef; + } + } + } + } + namespace java + { + namespace rmi + { + namespace dgc + { + class Lease; + } + } + } +} + +class gnu::java::rmi::dgc::LeaseRenewingTask : public ::java::lang::Object +{ + +public: + LeaseRenewingTask(::gnu::java::rmi::server::UnicastRef *); + static void scheduleLeases(::gnu::java::rmi::server::UnicastRef *); + virtual void schedule(::java::rmi::dgc::Lease *); + virtual void renew(); + virtual ::java::rmi::dgc::Lease * notifyDGC(::gnu::java::rmi::server::UnicastRef *); + static jlong REQUEST_LEASE_DURATION; +public: // actually package-private + ::java::util::LinkedList * __attribute__((aligned(__alignof__( ::java::lang::Object)))) ref; + ::java::rmi::dgc::Lease * lease; + static ::java::util::Timer * timer; + static ::java::util::WeakHashMap * existingTasks; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_dgc_LeaseRenewingTask__ diff --git a/libjava/gnu/java/rmi/registry/RegistryImpl.h b/libjava/gnu/java/rmi/registry/RegistryImpl.h new file mode 100644 index 00000000000..d4ae0194564 --- /dev/null +++ b/libjava/gnu/java/rmi/registry/RegistryImpl.h @@ -0,0 +1,61 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_registry_RegistryImpl__ +#define __gnu_java_rmi_registry_RegistryImpl__ + +#pragma interface + +#include <java/rmi/server/UnicastRemoteObject.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace registry + { + class RegistryImpl; + } + } + } + } + namespace java + { + namespace rmi + { + class Remote; + namespace server + { + class RMIClientSocketFactory; + class RMIServerSocketFactory; + } + } + } +} + +class gnu::java::rmi::registry::RegistryImpl : public ::java::rmi::server::UnicastRemoteObject +{ + +public: + RegistryImpl(jint); + RegistryImpl(jint, ::java::rmi::server::RMIClientSocketFactory *, ::java::rmi::server::RMIServerSocketFactory *); + virtual ::java::rmi::Remote * lookup(::java::lang::String *); + virtual void bind(::java::lang::String *, ::java::rmi::Remote *); + virtual void unbind(::java::lang::String *); + virtual void rebind(::java::lang::String *, ::java::rmi::Remote *); + virtual JArray< ::java::lang::String * > * list(); + static void version(); + static void help(); + static void main(JArray< ::java::lang::String * > *); +private: + ::java::util::Hashtable * __attribute__((aligned(__alignof__( ::java::rmi::server::UnicastRemoteObject)))) bindings; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_registry_RegistryImpl__ diff --git a/libjava/gnu/java/rmi/registry/RegistryImpl_Skel.h b/libjava/gnu/java/rmi/registry/RegistryImpl_Skel.h new file mode 100644 index 00000000000..898d8e8887d --- /dev/null +++ b/libjava/gnu/java/rmi/registry/RegistryImpl_Skel.h @@ -0,0 +1,55 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_registry_RegistryImpl_Skel__ +#define __gnu_java_rmi_registry_RegistryImpl_Skel__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace registry + { + class RegistryImpl_Skel; + } + } + } + } + namespace java + { + namespace rmi + { + class Remote; + namespace server + { + class Operation; + class RemoteCall; + } + } + } +} + +class gnu::java::rmi::registry::RegistryImpl_Skel : public ::java::lang::Object +{ + +public: + RegistryImpl_Skel(); + JArray< ::java::rmi::server::Operation * > * getOperations(); + void dispatch(::java::rmi::Remote *, ::java::rmi::server::RemoteCall *, jint, jlong); +private: + static const jlong interfaceHash = 4905912898345647071LL; + static JArray< ::java::rmi::server::Operation * > * operations; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_registry_RegistryImpl_Skel__ diff --git a/libjava/gnu/java/rmi/registry/RegistryImpl_Stub.h b/libjava/gnu/java/rmi/registry/RegistryImpl_Stub.h new file mode 100644 index 00000000000..89834426478 --- /dev/null +++ b/libjava/gnu/java/rmi/registry/RegistryImpl_Stub.h @@ -0,0 +1,66 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_registry_RegistryImpl_Stub__ +#define __gnu_java_rmi_registry_RegistryImpl_Stub__ + +#pragma interface + +#include <java/rmi/server/RemoteStub.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace registry + { + class RegistryImpl_Stub; + } + } + } + } + namespace java + { + namespace rmi + { + class Remote; + namespace server + { + class Operation; + class RemoteRef; + } + } + } +} + +class gnu::java::rmi::registry::RegistryImpl_Stub : public ::java::rmi::server::RemoteStub +{ + +public: + RegistryImpl_Stub(); + RegistryImpl_Stub(::java::rmi::server::RemoteRef *); + void bind(::java::lang::String *, ::java::rmi::Remote *); + JArray< ::java::lang::String * > * list(); + ::java::rmi::Remote * lookup(::java::lang::String *); + void rebind(::java::lang::String *, ::java::rmi::Remote *); + void unbind(::java::lang::String *); +private: + static const jlong serialVersionUID = 2LL; + static const jlong interfaceHash = 4905912898345647071LL; + static jboolean useNewInvoke; + static JArray< ::java::rmi::server::Operation * > * operations; + static ::java::lang::reflect::Method * $method_bind_0; + static ::java::lang::reflect::Method * $method_list_1; + static ::java::lang::reflect::Method * $method_lookup_2; + static ::java::lang::reflect::Method * $method_rebind_3; + static ::java::lang::reflect::Method * $method_unbind_4; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_registry_RegistryImpl_Stub__ diff --git a/libjava/gnu/java/rmi/rmic/Compile_gcj.java b/libjava/gnu/java/rmi/rmic/Compile_gcj.java deleted file mode 100644 index e22611bb3ad..00000000000 --- a/libjava/gnu/java/rmi/rmic/Compile_gcj.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - Copyright (c) 2001, 2003 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -package gnu.java.rmi.rmic; - -/** Subclass of Compiler that can be used to invoke gcj. */ -public class Compile_gcj extends CompilerProcess -{ - private static final String [] COMPILER_ARGS = - { - "gcj", - "-C" - }; - - public String[] computeArguments (String filename) - { - return computeTypicalArguments(COMPILER_ARGS, - getClasspath(), - getDestination(), - filename); - } -} diff --git a/libjava/gnu/java/rmi/rmic/Compile_jikes.java b/libjava/gnu/java/rmi/rmic/Compile_jikes.java deleted file mode 100644 index e70b50c910b..00000000000 --- a/libjava/gnu/java/rmi/rmic/Compile_jikes.java +++ /dev/null @@ -1,57 +0,0 @@ -/*
- Copyright (c) 2003 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-package gnu.java.rmi.rmic;
-
-/** Subclass of Compiler that can be used to invoke jikes. */
-public class Compile_jikes extends CompilerProcess
-{
- /** Compiler arguments to invoke jikes */
- private static final String [] COMPILER_ARGS =
- {
- "jikes"
- };
-
- /** Compute the command line for the process. */
- public String[] computeArguments (String filename)
- {
- return computeTypicalArguments(COMPILER_ARGS,
- getClasspath(),
- getDestination(),
- filename);
- }
-}
diff --git a/libjava/gnu/java/rmi/rmic/Compile_kjc.java b/libjava/gnu/java/rmi/rmic/Compile_kjc.java deleted file mode 100644 index 79f1a845c36..00000000000 --- a/libjava/gnu/java/rmi/rmic/Compile_kjc.java +++ /dev/null @@ -1,57 +0,0 @@ -/*
- Copyright (c) 2003 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-package gnu.java.rmi.rmic;
-
-/** Subclass of Compiler that can be used to invoke kjc. */
-public class Compile_kjc extends CompilerProcess
-{
- /** Compiler arguments to invoke kjc */
- private static final String [] COMPILER_ARGS =
- {
- "kjc"
- };
-
- /** Compute the command line for the process. */
- public String[] computeArguments (String filename)
- {
- return computeTypicalArguments(COMPILER_ARGS,
- getClasspath(),
- getDestination(),
- filename);
- }
-}
diff --git a/libjava/gnu/java/rmi/rmic/Compiler.java b/libjava/gnu/java/rmi/rmic/Compiler.java deleted file mode 100644 index fc1f8464fa6..00000000000 --- a/libjava/gnu/java/rmi/rmic/Compiler.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - Copyright (c) 2001, 2003 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -package gnu.java.rmi.rmic; - -/** - * A Compiler object can be used to compile a .java file into a - * .class file. This is an abstract class; the - * <code>getInstance()</code> method is used to obtain the actual - * compiler object. - */ -public abstract class Compiler -{ - // Can't directly instantiate. - protected Compiler () - { - } - - /** Create a new compiler instance. */ - public static Compiler getInstance () - { - return getInstance (System.getProperty ("classpath.compiler", "gcj")); - } - - /** Create a new compiler instance given the name of the compiler. */ - public static Compiler getInstance (String name) - { - try - { - Class k = Class.forName (classPrefix + name); - return (Compiler) k.newInstance (); - } - catch (Throwable _) - { - } - return null; - } - - /** Get the directory where output files will be put. */ - public String getDestination () - { - return dest; - } - - /** Set the directory where output files will be put. */ - public void setDestination (String dest) - { - this.dest = dest; - } - - /** Get the classpath for compilation. */ - public String getClasspath () - { - return classpath; - } - - /** Set the classpath for compilation. */ - public void setClasspath (String classpath) - { - this.classpath = classpath; - } - - /** Compile the given file. Throws exception on error. */ - public abstract void compile (String name) throws Exception; - - /** The destination directory, or null if none set. */ - protected String dest; - - /** The classpath directory, or null if none set. */ - private String classpath; - - /** Class prefix used when trying to find instance. */ - private static final String classPrefix = "gnu.java.rmi.rmic.Compile_"; -} diff --git a/libjava/gnu/java/rmi/rmic/CompilerProcess.java b/libjava/gnu/java/rmi/rmic/CompilerProcess.java deleted file mode 100644 index d7b29987663..00000000000 --- a/libjava/gnu/java/rmi/rmic/CompilerProcess.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - Copyright (c) 2001, 2003 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -package gnu.java.rmi.rmic; - -import java.io.InputStream; - -/** - * Subclass of Compiler that can be subclassed to invoke a process to - * do its work. - */ -public abstract class CompilerProcess extends Compiler -{ - /** This is used to compute the command line for the process. */ - public abstract String[] computeArguments (String filename); - - /** - * This is used to compute the command line for the process. - * Most compilers typically arrange their arguments as in - * <compiler name and arguments> <optional destination> <filename>. - * This method builds an argument array out that. It should be used - * to define computeArguments for those compilers that follow the - * argument convention described above. - */ - public static String[] computeTypicalArguments(String[] compilerArgs, - String destination, String filename) - { - return computeTypicalArguments(compilerArgs, null, destination, filename); - } - /** - * This is used to compute the command line for the process. - * Most compilers typically arrange their arguments as in - * <compiler name and arguments> <optional destination> <filename>. - * This method builds an argument array out that. It should be used - * to define computeArguments for those compilers that follow the - * argument convention described above. - */ - public static String[] computeTypicalArguments(String[] compilerArgs, - String classpath, - String destination, - String filename) - { - /* length of compiler specific arguments */ - int len = compilerArgs.length; - - /* length of returned array of arguments */ - final int arglen = len + (classpath == null ? 0 : 2) + - (destination == null ? 0 : 2) + 1; - - /* Allocate String array for computed arguments. */ - String [] args = new String[arglen]; - - /* Fill in compiler arguments. */ - System.arraycopy(compilerArgs, 0, args, 0, len); - - /* Fill in classpath argument if necessary. */ - if (classpath != null) - { - args[len++] = "-classpath"; - args[len++] = classpath; - } - - /* Fill in destination argument if necessary. */ - if (destination != null) - { - args[len++] = "-d"; - args[len++] = destination; - } - - /* Fill in filename */ - args[arglen - 1] = filename; - - return args; - } - - public void compile (String name) throws Exception - { - String[] args = computeArguments (name); - Process p = Runtime.getRuntime ().exec (args); - - /* Print compiler output to System.out. Do this asynchronously so - that the compiler never blocks writing to its stdout. */ - { - final InputStream procin = p.getInputStream(); - final Thread copier = new Thread() - { - public void run() - { - try - { - for (int ch = procin.read(); ch != -1; ch = procin.read()) - System.out.print((char) ch); - } - catch (java.io.IOException _) - { - } - } - }; - - copier.start(); - } - - /* Collect compiler error output in a buffer. - * If compilation fails, it will be used for an error message. - */ - StringBuffer stderr = new StringBuffer(); - InputStream procerr = p.getErrorStream(); - for (int ch = procerr.read(); ch != -1; ch = procerr.read()) - stderr.append((char) ch); - - int result; - while (true) - { - try - { - result = p.waitFor (); - break; - } - catch (InterruptedException _) - { - } - } - if (result != 0) - { - // FIXME: wrong exception class. - throw new Exception ("compiler exited with status: " + result, - new RMICException(stderr.toString())); - } - } -} diff --git a/libjava/gnu/java/rmi/rmic/RMIC.java b/libjava/gnu/java/rmi/rmic/RMIC.java deleted file mode 100644 index 33ec9935b62..00000000000 --- a/libjava/gnu/java/rmi/rmic/RMIC.java +++ /dev/null @@ -1,1225 +0,0 @@ -/* RMIC.java -- - Copyright (c) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - - -package gnu.java.rmi.rmic; - -import gnu.java.rmi.server.RMIHashes; - -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.io.PrintWriter; -import java.lang.reflect.Method; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLClassLoader; -import java.rmi.Remote; -import java.rmi.RemoteException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; -import java.util.StringTokenizer; - - -public class RMIC -{ - private String[] args; - private int next; - private Exception exception; - private boolean keep = false; - private boolean need11Stubs = true; - private boolean need12Stubs = true; - private boolean compile = true; - private boolean verbose; - private String destination; - private PrintWriter out; - private TabbedWriter ctrl; - private Class clazz; - private String classname; - private String fullclassname; - private String fullstubname; - private String fullskelname; - private MethodRef[] remotemethods; - private String stubname; - private String skelname; - private ClassLoader loader; - private String classpath; - private int errorCount = 0; - private List mRemoteInterfaces; - - public RMIC(String[] a) - { - args = a; - } - - public static void main(String[] args) - { - RMIC r = new RMIC(args); - if (r.run() == false) - { - Exception e = r.getException(); - if (e != null) - e.printStackTrace(); - else - System.exit(1); - } - } - - public boolean run() - { - parseOptions(); - if (next >= args.length) - error("no class names found"); - for (int i = next; i < args.length; i++) - { - try - { - if (verbose) - System.out.println("[Processing class " + args[i] + ".class]"); - processClass(args[i].replace(File.separatorChar, '.')); - } - catch (Exception e) - { - exception = e; - return (false); - } - } - return (true); - } - - private boolean processClass(String cls) throws Exception - { - // reset class specific vars - clazz = null; - classname = null; - fullclassname = null; - remotemethods = null; - stubname = null; - fullstubname = null; - skelname = null; - fullskelname = null; - mRemoteInterfaces = new ArrayList(); - - errorCount = 0; - - analyzeClass(cls); - - if (errorCount > 0) - System.exit(1); - generateStub(); - if (need11Stubs) - generateSkel(); - if (compile) - { - compile(fullstubname); - if (need11Stubs) - compile(fullskelname); - } - if (! keep) - { - (new File(fullstubname)).delete(); - if (need11Stubs) - (new File(fullskelname)).delete(); - } - return (true); - } - - private void analyzeClass(String cname) throws Exception - { - if (verbose) - System.out.println("[analyze class " + cname + "]"); - int p = cname.lastIndexOf('.'); - if (p != -1) - classname = cname.substring(p + 1); - else - classname = cname; - fullclassname = cname; - - findClass(); - findRemoteMethods(); - } - - public Exception getException() - { - return (exception); - } - - private void findClass() throws ClassNotFoundException - { - try - { - ClassLoader cl = (loader == null - ? ClassLoader.getSystemClassLoader() - : loader); - clazz = Class.forName(fullclassname, false, cl); - } - catch (ClassNotFoundException cnfe) - { - System.err.println(fullclassname + " not found in " + classpath); - throw new RuntimeException(cnfe); - } - - if (! Remote.class.isAssignableFrom(clazz)) - { - logError("Class " + clazz.getName() + " is not a remote object. " - + "It does not implement an interface that is a " - + "java.rmi.Remote-interface."); - throw new RuntimeException - ("Class " + clazz.getName() + " is not a remote object. " - + "It does not implement an interface that is a " - + "java.rmi.Remote-interface."); - } - } - - private void generateStub() throws IOException - { - stubname = fullclassname + "_Stub"; - String stubclassname = classname + "_Stub"; - fullstubname = (destination == null ? "" : destination + File.separator) - + stubname.replace('.', File.separatorChar) + ".java"; - File file = new File(fullstubname); - if (file.getParentFile() != null) - file.getParentFile().mkdirs(); - ctrl = - new TabbedWriter(new FileWriter(file)); - out = new PrintWriter(ctrl); - - if (verbose) - System.out.println("[Generating class " + stubname + ".java]"); - - out.println("// Stub class generated by rmic - DO NOT EDIT!"); - out.println(); - if (fullclassname != classname) - { - String pname = - fullclassname.substring(0, fullclassname.lastIndexOf('.')); - out.println("package " + pname + ";"); - out.println(); - } - - out.print("public final class " + stubclassname); - ctrl.indent(); - out.println("extends java.rmi.server.RemoteStub"); - - // Output interfaces we implement - out.print("implements "); - Iterator iter = mRemoteInterfaces.iterator(); - while (iter.hasNext()) - { - /* Print remote interface. */ - Class iface = (Class) iter.next(); - out.print(iface.getName()); - - /* Print ", " if more remote interfaces follow. */ - if (iter.hasNext()) - out.print(", "); - } - ctrl.unindent(); - out.print("{"); - ctrl.indent(); - - // UID - if (need12Stubs) - { - out.println("private static final long serialVersionUID = 2L;"); - out.println(); - } - - // InterfaceHash - don't know how to calculate this - XXX - if (need11Stubs) - { - out.println("private static final long interfaceHash = " - + RMIHashes.getInterfaceHash(clazz) + "L;"); - out.println(); - if (need12Stubs) - { - out.println("private static boolean useNewInvoke;"); - out.println(); - } - - // Operation table - out.print("private static final java.rmi.server.Operation[] operations = {"); - - ctrl.indent(); - for (int i = 0; i < remotemethods.length; i++) - { - Method m = remotemethods[i].meth; - out.print("new java.rmi.server.Operation(\""); - out.print(getPrettyName(m.getReturnType()) + " "); - out.print(m.getName() + "("); - // Output signature - Class[] sig = m.getParameterTypes(); - for (int j = 0; j < sig.length; j++) - { - out.print(getPrettyName(sig[j])); - if (j + 1 < sig.length) - out.print(", "); - } - out.print(")\")"); - if (i + 1 < remotemethods.length) - out.println(","); - } - ctrl.unindent(); - out.println("};"); - out.println(); - } - - // Set of method references. - if (need12Stubs) - { - for (int i = 0; i < remotemethods.length; i++) - { - Method m = remotemethods[i].meth; - out.println("private static java.lang.reflect.Method $method_" - + m.getName() + "_" + i + ";"); - } - - // Initialize the methods references. - out.println(); - out.print("static {"); - ctrl.indent(); - - out.print("try {"); - ctrl.indent(); - - if (need11Stubs) - { - out.println("java.rmi.server.RemoteRef.class.getMethod(\"invoke\", new java.lang.Class[] { java.rmi.Remote.class, java.lang.reflect.Method.class, java.lang.Object[].class, long.class });"); - out.println("useNewInvoke = true;"); - } - - for (int i = 0; i < remotemethods.length; i++) - { - Method m = remotemethods[i].meth; - out.print("$method_" + m.getName() + "_" + i + " = "); - out.print(m.getDeclaringClass().getName() + ".class.getMethod(\"" - + m.getName() + "\""); - out.print(", new java.lang.Class[] {"); - // Output signature - Class[] sig = m.getParameterTypes(); - for (int j = 0; j < sig.length; j++) - { - out.print(getPrettyName(sig[j]) + ".class"); - if (j + 1 < sig.length) - out.print(", "); - } - out.println("});"); - } - ctrl.unindent(); - out.println("}"); - out.print("catch (java.lang.NoSuchMethodException e) {"); - ctrl.indent(); - if (need11Stubs) - out.print("useNewInvoke = false;"); - else - out.print("throw new java.lang.NoSuchMethodError(\"stub class initialization failed\");"); - - ctrl.unindent(); - out.print("}"); - - ctrl.unindent(); - out.println("}"); - out.println(); - } - - // Constructors - if (need11Stubs) - { - out.print("public " + stubclassname + "() {"); - ctrl.indent(); - out.print("super();"); - ctrl.unindent(); - out.println("}"); - } - - if (need12Stubs) - { - out.print("public " + stubclassname - + "(java.rmi.server.RemoteRef ref) {"); - ctrl.indent(); - out.print("super(ref);"); - ctrl.unindent(); - out.println("}"); - } - - // Method implementations - for (int i = 0; i < remotemethods.length; i++) - { - Method m = remotemethods[i].meth; - Class[] sig = m.getParameterTypes(); - Class returntype = m.getReturnType(); - Class[] except = sortExceptions(m.getExceptionTypes()); - - out.println(); - out.print("public " + getPrettyName(returntype) + " " + m.getName() - + "("); - for (int j = 0; j < sig.length; j++) - { - out.print(getPrettyName(sig[j])); - out.print(" $param_" + j); - if (j + 1 < sig.length) - out.print(", "); - } - out.print(") "); - out.print("throws "); - for (int j = 0; j < except.length; j++) - { - out.print(getPrettyName(except[j])); - if (j + 1 < except.length) - out.print(", "); - } - out.print(" {"); - ctrl.indent(); - - out.print("try {"); - ctrl.indent(); - - if (need12Stubs) - { - if (need11Stubs) - { - out.print("if (useNewInvoke) {"); - ctrl.indent(); - } - if (returntype != Void.TYPE) - out.print("java.lang.Object $result = "); - out.print("ref.invoke(this, $method_" + m.getName() + "_" + i - + ", "); - if (sig.length == 0) - out.print("null, "); - else - { - out.print("new java.lang.Object[] {"); - for (int j = 0; j < sig.length; j++) - { - if (sig[j] == Boolean.TYPE) - out.print("new java.lang.Boolean($param_" + j + ")"); - else if (sig[j] == Byte.TYPE) - out.print("new java.lang.Byte($param_" + j + ")"); - else if (sig[j] == Character.TYPE) - out.print("new java.lang.Character($param_" + j + ")"); - else if (sig[j] == Short.TYPE) - out.print("new java.lang.Short($param_" + j + ")"); - else if (sig[j] == Integer.TYPE) - out.print("new java.lang.Integer($param_" + j + ")"); - else if (sig[j] == Long.TYPE) - out.print("new java.lang.Long($param_" + j + ")"); - else if (sig[j] == Float.TYPE) - out.print("new java.lang.Float($param_" + j + ")"); - else if (sig[j] == Double.TYPE) - out.print("new java.lang.Double($param_" + j + ")"); - else - out.print("$param_" + j); - if (j + 1 < sig.length) - out.print(", "); - } - out.print("}, "); - } - out.print(Long.toString(remotemethods[i].hash) + "L"); - out.print(");"); - - if (returntype != Void.TYPE) - { - out.println(); - out.print("return ("); - if (returntype == Boolean.TYPE) - out.print("((java.lang.Boolean)$result).booleanValue()"); - else if (returntype == Byte.TYPE) - out.print("((java.lang.Byte)$result).byteValue()"); - else if (returntype == Character.TYPE) - out.print("((java.lang.Character)$result).charValue()"); - else if (returntype == Short.TYPE) - out.print("((java.lang.Short)$result).shortValue()"); - else if (returntype == Integer.TYPE) - out.print("((java.lang.Integer)$result).intValue()"); - else if (returntype == Long.TYPE) - out.print("((java.lang.Long)$result).longValue()"); - else if (returntype == Float.TYPE) - out.print("((java.lang.Float)$result).floatValue()"); - else if (returntype == Double.TYPE) - out.print("((java.lang.Double)$result).doubleValue()"); - else - out.print("(" + getPrettyName(returntype) + ")$result"); - out.print(");"); - } - - if (need11Stubs) - { - ctrl.unindent(); - out.println("}"); - out.print("else {"); - ctrl.indent(); - } - } - - if (need11Stubs) - { - out.println("java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject)this, operations, " - + i + ", interfaceHash);"); - out.print("try {"); - ctrl.indent(); - out.print("java.io.ObjectOutput out = call.getOutputStream();"); - for (int j = 0; j < sig.length; j++) - { - out.println(); - if (sig[j] == Boolean.TYPE) - out.print("out.writeBoolean("); - else if (sig[j] == Byte.TYPE) - out.print("out.writeByte("); - else if (sig[j] == Character.TYPE) - out.print("out.writeChar("); - else if (sig[j] == Short.TYPE) - out.print("out.writeShort("); - else if (sig[j] == Integer.TYPE) - out.print("out.writeInt("); - else if (sig[j] == Long.TYPE) - out.print("out.writeLong("); - else if (sig[j] == Float.TYPE) - out.print("out.writeFloat("); - else if (sig[j] == Double.TYPE) - out.print("out.writeDouble("); - else - out.print("out.writeObject("); - out.print("$param_" + j + ");"); - } - ctrl.unindent(); - out.println("}"); - out.print("catch (java.io.IOException e) {"); - ctrl.indent(); - out.print("throw new java.rmi.MarshalException(\"error marshalling arguments\", e);"); - ctrl.unindent(); - out.println("}"); - out.println("ref.invoke(call);"); - if (returntype != Void.TYPE) - out.println(getPrettyName(returntype) + " $result;"); - out.print("try {"); - ctrl.indent(); - out.print("java.io.ObjectInput in = call.getInputStream();"); - boolean needcastcheck = false; - if (returntype != Void.TYPE) - { - out.println(); - out.print("$result = "); - if (returntype == Boolean.TYPE) - out.print("in.readBoolean();"); - else if (returntype == Byte.TYPE) - out.print("in.readByte();"); - else if (returntype == Character.TYPE) - out.print("in.readChar();"); - else if (returntype == Short.TYPE) - out.print("in.readShort();"); - else if (returntype == Integer.TYPE) - out.print("in.readInt();"); - else if (returntype == Long.TYPE) - out.print("in.readLong();"); - else if (returntype == Float.TYPE) - out.print("in.readFloat();"); - else if (returntype == Double.TYPE) - out.print("in.readDouble();"); - else - { - if (returntype != Object.class) - out.print("(" + getPrettyName(returntype) + ")"); - else - needcastcheck = true; - out.print("in.readObject();"); - } - out.println(); - out.print("return ($result);"); - } - ctrl.unindent(); - out.println("}"); - out.print("catch (java.io.IOException e) {"); - ctrl.indent(); - out.print("throw new java.rmi.UnmarshalException(\"error unmarshalling return\", e);"); - ctrl.unindent(); - out.println("}"); - if (needcastcheck) - { - out.print("catch (java.lang.ClassNotFoundException e) {"); - ctrl.indent(); - out.print("throw new java.rmi.UnmarshalException(\"error unmarshalling return\", e);"); - ctrl.unindent(); - out.println("}"); - } - out.print("finally {"); - ctrl.indent(); - out.print("ref.done(call);"); - ctrl.unindent(); - out.print("}"); - - if (need12Stubs && need11Stubs) - { - ctrl.unindent(); - out.print("}"); - } - } - - ctrl.unindent(); - out.print("}"); - - boolean needgeneral = true; - for (int j = 0; j < except.length; j++) - { - out.println(); - out.print("catch (" + getPrettyName(except[j]) + " e) {"); - ctrl.indent(); - out.print("throw e;"); - ctrl.unindent(); - out.print("}"); - if (except[j] == Exception.class) - needgeneral = false; - } - if (needgeneral) - { - out.println(); - out.print("catch (java.lang.Exception e) {"); - ctrl.indent(); - out.print("throw new java.rmi.UnexpectedException(\"undeclared checked exception\", e);"); - ctrl.unindent(); - out.print("}"); - } - - ctrl.unindent(); - out.print("}"); - out.println(); - } - - ctrl.unindent(); - out.println("}"); - - out.close(); - } - - private void generateSkel() throws IOException - { - skelname = fullclassname + "_Skel"; - String skelclassname = classname + "_Skel"; - fullskelname = (destination == null ? "" : destination + File.separator) - + skelname.replace('.', File.separatorChar) + ".java"; - File file = new File(fullskelname); - if (file.getParentFile() != null) - file.getParentFile().mkdirs(); - ctrl = - new TabbedWriter(new FileWriter(file)); - out = new PrintWriter(ctrl); - - if (verbose) - System.out.println("[Generating class " + skelname + ".java]"); - - out.println("// Skel class generated by rmic - DO NOT EDIT!"); - out.println(); - if (fullclassname != classname) - { - String pname = - fullclassname.substring(0, fullclassname.lastIndexOf('.')); - out.println("package " + pname + ";"); - out.println(); - } - - out.print("public final class " + skelclassname); - ctrl.indent(); - - // Output interfaces we implement - out.print("implements java.rmi.server.Skeleton"); - - ctrl.unindent(); - out.print("{"); - ctrl.indent(); - - // Interface hash - don't know how to calculate this - XXX - out.println("private static final long interfaceHash = " - + RMIHashes.getInterfaceHash(clazz) + "L;"); - out.println(); - - // Operation table - out.print("private static final java.rmi.server.Operation[] operations = {"); - - ctrl.indent(); - for (int i = 0; i < remotemethods.length; i++) - { - Method m = remotemethods[i].meth; - out.print("new java.rmi.server.Operation(\""); - out.print(getPrettyName(m.getReturnType()) + " "); - out.print(m.getName() + "("); - // Output signature - Class[] sig = m.getParameterTypes(); - for (int j = 0; j < sig.length; j++) - { - out.print(getPrettyName(sig[j])); - if (j + 1 < sig.length) - out.print(", "); - } - out.print("\")"); - if (i + 1 < remotemethods.length) - out.println(","); - } - ctrl.unindent(); - out.println("};"); - - out.println(); - - // getOperations method - out.print("public java.rmi.server.Operation[] getOperations() {"); - ctrl.indent(); - out.print("return ((java.rmi.server.Operation[]) operations.clone());"); - ctrl.unindent(); - out.println("}"); - - out.println(); - - // Dispatch method - out.print("public void dispatch(java.rmi.Remote obj, java.rmi.server.RemoteCall call, int opnum, long hash) throws java.lang.Exception {"); - ctrl.indent(); - - out.print("if (opnum < 0) {"); - ctrl.indent(); - - for (int i = 0; i < remotemethods.length; i++) - { - out.print("if (hash == " + Long.toString(remotemethods[i].hash) - + "L) {"); - ctrl.indent(); - out.print("opnum = " + i + ";"); - ctrl.unindent(); - out.println("}"); - out.print("else "); - } - out.print("{"); - ctrl.indent(); - out.print("throw new java.rmi.server.SkeletonMismatchException(\"interface hash mismatch\");"); - ctrl.unindent(); - out.print("}"); - - ctrl.unindent(); - out.println("}"); - out.print("else if (hash != interfaceHash) {"); - ctrl.indent(); - out.print("throw new java.rmi.server.SkeletonMismatchException(\"interface hash mismatch\");"); - ctrl.unindent(); - out.println("}"); - - out.println(); - - out.println(fullclassname + " server = (" + fullclassname + ")obj;"); - out.println("switch (opnum) {"); - - // Method dispatch - for (int i = 0; i < remotemethods.length; i++) - { - Method m = remotemethods[i].meth; - out.println("case " + i + ":"); - out.print("{"); - ctrl.indent(); - - Class[] sig = m.getParameterTypes(); - for (int j = 0; j < sig.length; j++) - { - out.print(getPrettyName(sig[j])); - out.println(" $param_" + j + ";"); - } - - out.print("try {"); - boolean needcastcheck = false; - ctrl.indent(); - out.println("java.io.ObjectInput in = call.getInputStream();"); - for (int j = 0; j < sig.length; j++) - { - out.print("$param_" + j + " = "); - if (sig[j] == Boolean.TYPE) - out.print("in.readBoolean();"); - else if (sig[j] == Byte.TYPE) - out.print("in.readByte();"); - else if (sig[j] == Character.TYPE) - out.print("in.readChar();"); - else if (sig[j] == Short.TYPE) - out.print("in.readShort();"); - else if (sig[j] == Integer.TYPE) - out.print("in.readInt();"); - else if (sig[j] == Long.TYPE) - out.print("in.readLong();"); - else if (sig[j] == Float.TYPE) - out.print("in.readFloat();"); - else if (sig[j] == Double.TYPE) - out.print("in.readDouble();"); - else - { - if (sig[j] != Object.class) - { - out.print("(" + getPrettyName(sig[j]) + ")"); - needcastcheck = true; - } - out.print("in.readObject();"); - } - out.println(); - } - ctrl.unindent(); - out.println("}"); - out.print("catch (java.io.IOException e) {"); - ctrl.indent(); - out.print("throw new java.rmi.UnmarshalException(\"error unmarshalling arguments\", e);"); - ctrl.unindent(); - out.println("}"); - if (needcastcheck) - { - out.print("catch (java.lang.ClassCastException e) {"); - ctrl.indent(); - out.print("throw new java.rmi.UnmarshalException(\"error unmarshalling arguments\", e);"); - ctrl.unindent(); - out.println("}"); - } - out.print("finally {"); - ctrl.indent(); - out.print("call.releaseInputStream();"); - ctrl.unindent(); - out.println("}"); - - Class returntype = m.getReturnType(); - if (returntype != Void.TYPE) - out.print(getPrettyName(returntype) + " $result = "); - out.print("server." + m.getName() + "("); - for (int j = 0; j < sig.length; j++) - { - out.print("$param_" + j); - if (j + 1 < sig.length) - out.print(", "); - } - out.println(");"); - - out.print("try {"); - ctrl.indent(); - out.print("java.io.ObjectOutput out = call.getResultStream(true);"); - if (returntype != Void.TYPE) - { - out.println(); - if (returntype == Boolean.TYPE) - out.print("out.writeBoolean($result);"); - else if (returntype == Byte.TYPE) - out.print("out.writeByte($result);"); - else if (returntype == Character.TYPE) - out.print("out.writeChar($result);"); - else if (returntype == Short.TYPE) - out.print("out.writeShort($result);"); - else if (returntype == Integer.TYPE) - out.print("out.writeInt($result);"); - else if (returntype == Long.TYPE) - out.print("out.writeLong($result);"); - else if (returntype == Float.TYPE) - out.print("out.writeFloat($result);"); - else if (returntype == Double.TYPE) - out.print("out.writeDouble($result);"); - else - out.print("out.writeObject($result);"); - } - ctrl.unindent(); - out.println("}"); - out.print("catch (java.io.IOException e) {"); - ctrl.indent(); - out.print("throw new java.rmi.MarshalException(\"error marshalling return\", e);"); - ctrl.unindent(); - out.println("}"); - out.print("break;"); - - ctrl.unindent(); - out.println("}"); - out.println(); - } - - out.print("default:"); - ctrl.indent(); - out.print("throw new java.rmi.UnmarshalException(\"invalid method number\");"); - ctrl.unindent(); - out.print("}"); - - ctrl.unindent(); - out.print("}"); - - ctrl.unindent(); - out.println("}"); - - out.close(); - } - - private void compile(String name) throws Exception - { - Compiler comp = Compiler.getInstance(); - if (verbose) - System.out.println("[Compiling class " + name + "]"); - comp.setDestination(destination); - if (classpath != null) - comp.setClasspath(classpath); - comp.compile(name); - } - - private static String getPrettyName(Class cls) - { - StringBuffer str = new StringBuffer(); - for (int count = 0;; count++) - { - if (! cls.isArray()) - { - str.append(cls.getName()); - for (; count > 0; count--) - str.append("[]"); - return (str.toString()); - } - cls = cls.getComponentType(); - } - } - -/** - * Sort exceptions so the most general go last. - */ - private Class[] sortExceptions(Class[] except) - { - for (int i = 0; i < except.length; i++) - { - for (int j = i + 1; j < except.length; j++) - { - if (except[i].isAssignableFrom(except[j])) - { - Class tmp = except[i]; - except[i] = except[j]; - except[j] = tmp; - } - } - } - return (except); - } - -/** - * Process the options until we find the first argument. - */ - private void parseOptions() - { - for (;;) - { - if (next >= args.length || args[next].charAt(0) != '-') - break; - String arg = args[next]; - next++; - - // Accept `--' options if they look long enough. - if (arg.length() > 3 && arg.charAt(0) == '-' && arg.charAt(1) == '-') - arg = arg.substring(1); - - if (arg.equals("-keep")) - keep = true; - else if (arg.equals("-keepgenerated")) - keep = true; - else if (arg.equals("-v1.1")) - { - need11Stubs = true; - need12Stubs = false; - } - else if (arg.equals("-vcompat")) - { - need11Stubs = true; - need12Stubs = true; - } - else if (arg.equals("-v1.2")) - { - need11Stubs = false; - need12Stubs = true; - } - else if (arg.equals("-g")) - { - } - else if (arg.equals("-depend")) - { - } - else if (arg.equals("-nowarn")) - { - } - else if (arg.equals("-verbose")) - verbose = true; - else if (arg.equals("-nocompile")) - compile = false; - else if (arg.equals("-classpath")) - { - classpath = args[next]; - next++; - StringTokenizer st = - new StringTokenizer(classpath, File.pathSeparator); - URL[] u = new URL[st.countTokens()]; - for (int i = 0; i < u.length; i++) - { - String path = st.nextToken(); - File f = new File(path); - try - { - u[i] = f.toURL(); - } - catch (MalformedURLException mue) - { - error("malformed classpath component " + path); - } - } - loader = new URLClassLoader(u); - } - else if (arg.equals("-help")) - usage(); - else if (arg.equals("-version")) - { - System.out.println("rmic (" + System.getProperty("java.vm.name") - + ") " + System.getProperty("java.vm.version")); - System.out.println(); - System.out.println("Copyright 2006 Free Software Foundation, Inc."); - System.out.println("This is free software; see the source for copying conditions. There is NO"); - System.out.println("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."); - System.exit(0); - } - else if (arg.equals("-d")) - { - destination = args[next]; - next++; - } - else if (arg.charAt(1) == 'J') - { - } - else - error("unrecognized option `" + arg + "'"); - } - } - - private void findRemoteMethods() { - List rmeths = new ArrayList(); - for (Class cur = clazz; cur != null; cur = cur.getSuperclass()) - { - Class[] interfaces = cur.getInterfaces(); - for (int i = 0; i < interfaces.length; i++) - { - if (java.rmi.Remote.class.isAssignableFrom(interfaces[i])) - { - Class remoteInterface = interfaces[i]; - if (verbose) - System.out.println - ("[implements " + remoteInterface.getName() + "]"); - - // check if the methods declare RemoteExceptions - Method[] meths = remoteInterface.getMethods(); - for (int j = 0; j < meths.length; j++) - { - Method m = meths[j]; - Class[] exs = m.getExceptionTypes(); - - boolean throwsRemote = false; - for (int k = 0; k < exs.length; k++) - { - if (exs[k].isAssignableFrom(RemoteException.class)) - throwsRemote = true; - } - - if (! throwsRemote) - { - logError("Method " + m - + " does not throw a RemoteException"); - continue; - } - - rmeths.add(m); - } - - mRemoteInterfaces.add(remoteInterface); - } - } - } - - // intersect exceptions for doubly inherited methods - boolean[] skip = new boolean[rmeths.size()]; - for (int i = 0; i < skip.length; i++) - skip[i] = false; - List methrefs = new ArrayList(); - for (int i = 0; i < rmeths.size(); i++) - { - if (skip[i]) continue; - Method current = (Method) rmeths.get(i); - MethodRef ref = new MethodRef(current); - for (int j = i+1; j < rmeths.size(); j++) - { - Method other = (Method) rmeths.get(j); - if (ref.isMatch(other)) - { - ref.intersectExceptions(other); - skip[j] = true; - } - } - methrefs.add(ref); - } - - // Convert into a MethodRef array and sort them - remotemethods = (MethodRef[]) - methrefs.toArray(new MethodRef[methrefs.size()]); - Arrays.sort(remotemethods); - } - -/** - * Prints an error to System.err and increases the error count. - * @param theError - */ - private void logError(String theError) - { - errorCount++; - System.err.println("error:" + theError); - } - - private static void error(String message) - { - System.err.println("rmic: " + message); - System.err.println("Try `rmic --help' for more information."); - System.exit(1); - } - - private static void usage() - { - System.out.println("Usage: rmic [OPTION]... CLASS...\n" + "\n" - + " -keep Don't delete any intermediate files\n" - + " -keepgenerated Same as -keep\n" - + " -v1.1 Java 1.1 style stubs only\n" - + " -vcompat Java 1.1 & Java 1.2 stubs\n" - + " -v1.2 Java 1.2 style stubs only\n" - + " -g * Generated debugging information\n" - + " -depend * Recompile out-of-date files\n" - + " -nowarn * Suppress warning messages\n" - + " -nocompile Don't compile the generated files\n" - + " -verbose Output what's going on\n" - + " -classpath <path> * Use given path as classpath\n" - + " -d <directory> Specify where to place generated classes\n" - + " -J<flag> * Pass flag to Java\n" - + " -help Print this help, then exit\n" - + " -version Print version number, then exit\n" + "\n" - + " * Option currently ignored\n" - + "Long options can be used with `--option' form as well."); - System.exit(0); - } - - private static class MethodRef - implements Comparable - { - Method meth; - long hash; - List exceptions; - private String sig; - - MethodRef(Method m) - { - meth = m; - sig = m.getName(); // XXX should be full signature used to compute hash - hash = RMIHashes.getMethodHash(m); - // add exceptions removing subclasses - exceptions = removeSubclasses(m.getExceptionTypes()); - } - - public int compareTo(Object obj) - { - MethodRef that = (MethodRef) obj; - int name = this.meth.getName().compareTo(that.meth.getName()); - if (name == 0) { - return this.sig.compareTo(that.sig); - } - return name; - } - - public boolean isMatch(Method m) - { - if (!meth.getName().equals(m.getName())) - return false; - - Class[] params1 = meth.getParameterTypes(); - Class[] params2 = m.getParameterTypes(); - if (params1.length != params2.length) - return false; - - for (int i = 0; i < params1.length; i++) - if (!params1[i].equals(params2[i])) return false; - - return true; - } - - private static List removeSubclasses(Class[] classes) - { - List list = new ArrayList(); - for (int i = 0; i < classes.length; i++) - { - Class candidate = classes[i]; - boolean add = true; - for (int j = 0; j < classes.length; j++) - { - if (classes[j].equals(candidate)) - continue; - else if (classes[j].isAssignableFrom(candidate)) - add = false; - } - if (add) list.add(candidate); - } - - return list; - } - - public void intersectExceptions(Method m) - { - List incoming = removeSubclasses(m.getExceptionTypes()); - - List updated = new ArrayList(); - - for (int i = 0; i < exceptions.size(); i++) - { - Class outer = (Class) exceptions.get(i); - boolean addOuter = false; - for (int j = 0; j < incoming.size(); j++) - { - Class inner = (Class) incoming.get(j); - - if (inner.equals(outer) || inner.isAssignableFrom(outer)) - addOuter = true; - else if (outer.isAssignableFrom(inner)) - updated.add(inner); - } - - if (addOuter) - updated.add(outer); - } - - exceptions = updated; - } - } -} diff --git a/libjava/gnu/java/rmi/rmic/RMICException.java b/libjava/gnu/java/rmi/rmic/RMICException.java deleted file mode 100644 index 8d0387e07af..00000000000 --- a/libjava/gnu/java/rmi/rmic/RMICException.java +++ /dev/null @@ -1,66 +0,0 @@ -/*
- Copyright (c) 2003 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-package gnu.java.rmi.rmic;
-
-/**
- * Thrown by the underlying compiler used by RMIC when it fails to compile a file.
- *
- * @author Dalibor Topic <robilad@kaffe.org>
- */
-
-public class RMICException extends Exception {
- /**
- * Create an exception with a message. The cause remains uninitialized.
- *
- * @param s the message string
- * @see #initCause(Throwable)
- */
- public RMICException(String message) {
- super(message);
- }
-
- /**
- * Create an exception with a message and a cause.
- *
- * @param s the message string
- * @param cause the cause of this exception
- */
- public RMICException(String message, Throwable cause) {
- super(message, cause);
- }
-}
diff --git a/libjava/gnu/java/rmi/rmic/TabbedWriter.java b/libjava/gnu/java/rmi/rmic/TabbedWriter.java deleted file mode 100644 index 31107a5756e..00000000000 --- a/libjava/gnu/java/rmi/rmic/TabbedWriter.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - Copyright (c) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -package gnu.java.rmi.rmic; - -import java.io.FilterWriter; -import java.io.Writer; -import java.io.IOException; - -public class TabbedWriter - extends FilterWriter { - -private static final String defaultTabstring = " "; -private char[] tabstring; -private int tabs; - -public TabbedWriter(Writer o) { - this(o, defaultTabstring); -} - -public TabbedWriter(Writer o, String str) { - super(o); - tabs = 0; - tabstring = str.toCharArray(); -} - -public void write(int c) throws IOException { - out.write(c); - if (c == '\n') { - for (int i = 0; i < tabs; i++) { - out.write(tabstring, 0, tabstring.length); - } - } -} - -public void write(char cbuf[], int off, int len) throws IOException { - for (int i = 0; i < len; i++) { - write((int)cbuf[i+off]); - } -} - -public void write(String str, int off, int len) throws IOException { - write(str.toCharArray(), off, len); -} - -public void unindent() throws IOException { - unindent(1); -} - -public void unindent(int nr) throws IOException { - indent(-nr); -} - -public void indent() throws IOException { - indent(1); -} - -public void indent(int nr) throws IOException { - tabs += nr; - if (tabs < 0) { - tabs = 0; - } - write((int)'\n'); -} - -} diff --git a/libjava/gnu/java/rmi/server/ActivatableRef.h b/libjava/gnu/java/rmi/server/ActivatableRef.h new file mode 100644 index 00000000000..6a9025ae76b --- /dev/null +++ b/libjava/gnu/java/rmi/server/ActivatableRef.h @@ -0,0 +1,65 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_ActivatableRef__ +#define __gnu_java_rmi_server_ActivatableRef__ + +#pragma interface + +#include <gnu/java/rmi/server/UnicastRef.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class ActivatableRef; + } + } + } + } + namespace java + { + namespace rmi + { + class Remote; + namespace activation + { + class ActivationID; + } + namespace server + { + class ObjID; + class RMIClientSocketFactory; + } + } + } +} + +class gnu::java::rmi::server::ActivatableRef : public ::gnu::java::rmi::server::UnicastRef +{ + +public: + ActivatableRef(); + ActivatableRef(::java::rmi::server::ObjID *, ::java::lang::String *, jint, ::java::rmi::server::RMIClientSocketFactory *); + ActivatableRef(::java::rmi::server::ObjID *); + virtual ::java::lang::String * getRefClass(::java::io::ObjectOutput *); + virtual void readExternal(::java::io::ObjectInput *); + virtual void writeExternal(::java::io::ObjectOutput *); +public: // actually protected + virtual ::java::lang::Object * invokeCommon(::java::rmi::Remote *, ::java::lang::reflect::Method *, JArray< ::java::lang::Object * > *, jint, jlong); +private: + static const jlong serialVersionUID = 1LL; +public: // actually package-private + ::java::rmi::activation::ActivationID * __attribute__((aligned(__alignof__( ::gnu::java::rmi::server::UnicastRef)))) actId; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_ActivatableRef__ diff --git a/libjava/gnu/java/rmi/server/ActivatableServerRef.h b/libjava/gnu/java/rmi/server/ActivatableServerRef.h new file mode 100644 index 00000000000..5241331e966 --- /dev/null +++ b/libjava/gnu/java/rmi/server/ActivatableServerRef.h @@ -0,0 +1,67 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_ActivatableServerRef__ +#define __gnu_java_rmi_server_ActivatableServerRef__ + +#pragma interface + +#include <gnu/java/rmi/server/UnicastServerRef.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class ActivatableServerRef; + class UnicastConnection; + } + } + } + } + namespace java + { + namespace rmi + { + class Remote; + namespace activation + { + class ActivationID; + } + namespace server + { + class ObjID; + class RMIServerSocketFactory; + } + } + } +} + +class gnu::java::rmi::server::ActivatableServerRef : public ::gnu::java::rmi::server::UnicastServerRef +{ + +public: + ActivatableServerRef(); + ActivatableServerRef(::java::rmi::server::ObjID *, ::java::rmi::activation::ActivationID *, jint, ::java::rmi::server::RMIServerSocketFactory *); + virtual void inactivate(); +public: // actually protected + virtual void activate(); +public: + virtual ::java::lang::Object * incomingMessageCall(::gnu::java::rmi::server::UnicastConnection *, jint, jlong); + virtual ::java::rmi::Remote * exportObject(::java::rmi::Remote *); + virtual ::java::rmi::Remote * exportClass(::java::lang::Class *); + virtual ::java::lang::String * getRefClass(::java::io::ObjectOutput *); + virtual void readExternal(::java::io::ObjectInput *); + virtual void writeExternal(::java::io::ObjectOutput *); +private: + static const jlong serialVersionUID = 1LL; +public: + ::java::rmi::activation::ActivationID * __attribute__((aligned(__alignof__( ::gnu::java::rmi::server::UnicastServerRef)))) actId; + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_ActivatableServerRef__ diff --git a/libjava/gnu/java/rmi/server/CombinedClassLoader.h b/libjava/gnu/java/rmi/server/CombinedClassLoader.h new file mode 100644 index 00000000000..5d4c6c9e624 --- /dev/null +++ b/libjava/gnu/java/rmi/server/CombinedClassLoader.h @@ -0,0 +1,51 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_CombinedClassLoader__ +#define __gnu_java_rmi_server_CombinedClassLoader__ + +#pragma interface + +#include <java/lang/ClassLoader.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class CombinedClassLoader; + } + } + } + } + namespace java + { + namespace net + { + class URL; + } + } +} + +class gnu::java::rmi::server::CombinedClassLoader : public ::java::lang::ClassLoader +{ + +public: + CombinedClassLoader(::java::util::Collection *); +public: // actually protected + virtual ::java::lang::Class * findClass(::java::lang::String *); + virtual ::java::net::URL * findResource(::java::lang::String *); + virtual ::java::util::Enumeration * findResources(::java::lang::String *); +public: // actually package-private + JArray< ::java::lang::ClassLoader * > * __attribute__((aligned(__alignof__( ::java::lang::ClassLoader)))) loaders; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_CombinedClassLoader__ diff --git a/libjava/gnu/java/rmi/server/ConnectionRunnerPool$ConnectionRunner.h b/libjava/gnu/java/rmi/server/ConnectionRunnerPool$ConnectionRunner.h new file mode 100644 index 00000000000..9b98afc9e13 --- /dev/null +++ b/libjava/gnu/java/rmi/server/ConnectionRunnerPool$ConnectionRunner.h @@ -0,0 +1,44 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_ConnectionRunnerPool$ConnectionRunner__ +#define __gnu_java_rmi_server_ConnectionRunnerPool$ConnectionRunner__ + +#pragma interface + +#include <java/lang/Thread.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class ConnectionRunnerPool$ConnectionRunner; + class UnicastConnection; + } + } + } + } +} + +class gnu::java::rmi::server::ConnectionRunnerPool$ConnectionRunner : public ::java::lang::Thread +{ + +public: + ConnectionRunnerPool$ConnectionRunner(::java::lang::ThreadGroup *, ::java::lang::String *); + virtual void run(); + virtual void dispatch(::gnu::java::rmi::server::UnicastConnection *); +public: // actually package-private + virtual void exit(); +private: + ::gnu::java::rmi::server::UnicastConnection * __attribute__((aligned(__alignof__( ::java::lang::Thread)))) conn; + volatile jboolean exiting; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_ConnectionRunnerPool$ConnectionRunner__ diff --git a/libjava/gnu/java/rmi/server/ConnectionRunnerPool.h b/libjava/gnu/java/rmi/server/ConnectionRunnerPool.h new file mode 100644 index 00000000000..eccfb38360b --- /dev/null +++ b/libjava/gnu/java/rmi/server/ConnectionRunnerPool.h @@ -0,0 +1,53 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_ConnectionRunnerPool__ +#define __gnu_java_rmi_server_ConnectionRunnerPool__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class ConnectionRunnerPool; + class ConnectionRunnerPool$ConnectionRunner; + class UnicastConnection; + } + } + } + } +} + +class gnu::java::rmi::server::ConnectionRunnerPool : public ::java::lang::Object +{ + +public: // actually package-private + ConnectionRunnerPool(); +public: + static void setSize(jint); + static void setMaxSize(jint); +private: + static ::gnu::java::rmi::server::ConnectionRunnerPool$ConnectionRunner * getConnectionRunner(); +public: + static void dispatchConnection(::gnu::java::rmi::server::UnicastConnection *); + static void exit(); +private: + static jint size; + static jint max_size; +public: // actually package-private + static ::java::util::ArrayList * freelist; +private: + static ::java::lang::ThreadGroup * group; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_ConnectionRunnerPool__ diff --git a/libjava/gnu/java/rmi/server/ProtocolConstants.h b/libjava/gnu/java/rmi/server/ProtocolConstants.h new file mode 100644 index 00000000000..d9b08e7f9df --- /dev/null +++ b/libjava/gnu/java/rmi/server/ProtocolConstants.h @@ -0,0 +1,49 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_ProtocolConstants__ +#define __gnu_java_rmi_server_ProtocolConstants__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class ProtocolConstants; + } + } + } + } +} + +class gnu::java::rmi::server::ProtocolConstants : public ::java::lang::Object +{ + +public: + static const jint PROTOCOL_HEADER = 1246907721; + static const jint PROTOCOL_VERSION = 2; + static const jint STREAM_PROTOCOL = 75; + static const jint SINGLE_OP_PROTOCOL = 76; + static const jint MULTIPLEX_PROTOCOL = 77; + static const jint PROTOCOL_ACK = 78; + static const jint PROTOCOL_NACK = 79; + static const jint MESSAGE_CALL = 80; + static const jint MESSAGE_CALL_ACK = 81; + static const jint MESSAGE_PING = 82; + static const jint MESSAGE_PING_ACK = 83; + static const jint MESSAGE_DGCACK = 84; + static const jint RETURN_ACK = 1; + static const jint RETURN_NACK = 2; + static const jint DEFAULT_PROTOCOL = 75; + static ::java::lang::Class class$; +} __attribute__ ((java_interface)); + +#endif // __gnu_java_rmi_server_ProtocolConstants__ diff --git a/libjava/gnu/java/rmi/server/RMIClassLoaderImpl$CacheKey.h b/libjava/gnu/java/rmi/server/RMIClassLoaderImpl$CacheKey.h new file mode 100644 index 00000000000..4afe1703993 --- /dev/null +++ b/libjava/gnu/java/rmi/server/RMIClassLoaderImpl$CacheKey.h @@ -0,0 +1,45 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_RMIClassLoaderImpl$CacheKey__ +#define __gnu_java_rmi_server_RMIClassLoaderImpl$CacheKey__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class RMIClassLoaderImpl$CacheKey; + } + } + } + } +} + +class gnu::java::rmi::server::RMIClassLoaderImpl$CacheKey : public ::java::lang::Object +{ + +public: + RMIClassLoaderImpl$CacheKey(::java::lang::String *, ::java::lang::ClassLoader *); + virtual jboolean equals(::java::lang::Object *); +private: + jboolean equals(::java::lang::Object *, ::java::lang::Object *); +public: + virtual jint hashCode(); + virtual ::java::lang::String * toString(); +private: + ::java::lang::String * __attribute__((aligned(__alignof__( ::java::lang::Object)))) mCodeBase; + ::java::lang::ClassLoader * mContextClassLoader; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_RMIClassLoaderImpl$CacheKey__ diff --git a/libjava/gnu/java/rmi/server/RMIClassLoaderImpl$MyClassLoader.h b/libjava/gnu/java/rmi/server/RMIClassLoaderImpl$MyClassLoader.h new file mode 100644 index 00000000000..b1078ffb464 --- /dev/null +++ b/libjava/gnu/java/rmi/server/RMIClassLoaderImpl$MyClassLoader.h @@ -0,0 +1,52 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_RMIClassLoaderImpl$MyClassLoader__ +#define __gnu_java_rmi_server_RMIClassLoaderImpl$MyClassLoader__ + +#pragma interface + +#include <java/net/URLClassLoader.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class RMIClassLoaderImpl$MyClassLoader; + } + } + } + } + namespace java + { + namespace net + { + class URL; + } + } +} + +class gnu::java::rmi::server::RMIClassLoaderImpl$MyClassLoader : public ::java::net::URLClassLoader +{ + +public: // actually package-private + RMIClassLoaderImpl$MyClassLoader(JArray< ::java::net::URL * > *, ::java::lang::ClassLoader *, ::java::lang::String *); +private: + RMIClassLoaderImpl$MyClassLoader(JArray< ::java::net::URL * > *, ::java::lang::ClassLoader *); +public: + static ::java::lang::String * urlToAnnotation(JArray< ::java::net::URL * > *); + virtual ::java::lang::String * getClassAnnotation(); +private: + ::java::lang::String * __attribute__((aligned(__alignof__( ::java::net::URLClassLoader)))) annotation; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_RMIClassLoaderImpl$MyClassLoader__ diff --git a/libjava/gnu/java/rmi/server/RMIClassLoaderImpl.h b/libjava/gnu/java/rmi/server/RMIClassLoaderImpl.h new file mode 100644 index 00000000000..abcb8fc6981 --- /dev/null +++ b/libjava/gnu/java/rmi/server/RMIClassLoaderImpl.h @@ -0,0 +1,65 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_RMIClassLoaderImpl__ +#define __gnu_java_rmi_server_RMIClassLoaderImpl__ + +#pragma interface + +#include <java/rmi/server/RMIClassLoaderSpi.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class RMIClassLoaderImpl; + class RMIClassLoaderImpl$MyClassLoader; + } + } + } + } + namespace java + { + namespace net + { + class URL; + } + namespace rmi + { + namespace server + { + class RMIClassLoaderSpi; + } + } + } +} + +class gnu::java::rmi::server::RMIClassLoaderImpl : public ::java::rmi::server::RMIClassLoaderSpi +{ + + RMIClassLoaderImpl(); +public: + static ::java::rmi::server::RMIClassLoaderSpi * getInstance(); + virtual ::java::lang::Class * loadClass(::java::lang::String *, ::java::lang::String *, ::java::lang::ClassLoader *); + virtual ::java::lang::Class * loadProxyClass(::java::lang::String *, JArray< ::java::lang::String * > *, ::java::lang::ClassLoader *); + virtual ::java::lang::ClassLoader * getClassLoader(::java::lang::String *); + virtual ::java::lang::String * getClassAnnotation(::java::lang::Class *); +private: + static ::gnu::java::rmi::server::RMIClassLoaderImpl * instance; + static ::java::util::Map * cacheLoaders; + static ::java::util::Map * cacheAnnotations; + static ::gnu::java::rmi::server::RMIClassLoaderImpl$MyClassLoader * defaultClassLoader; + static ::java::lang::String * defaultAnnotation; + static ::java::net::URL * defaultCodebase; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_RMIClassLoaderImpl__ diff --git a/libjava/gnu/java/rmi/server/RMIDefaultSocketFactory.h b/libjava/gnu/java/rmi/server/RMIDefaultSocketFactory.h new file mode 100644 index 00000000000..32da2951278 --- /dev/null +++ b/libjava/gnu/java/rmi/server/RMIDefaultSocketFactory.h @@ -0,0 +1,45 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_RMIDefaultSocketFactory__ +#define __gnu_java_rmi_server_RMIDefaultSocketFactory__ + +#pragma interface + +#include <java/rmi/server/RMISocketFactory.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class RMIDefaultSocketFactory; + } + } + } + } + namespace java + { + namespace net + { + class ServerSocket; + class Socket; + } + } +} + +class gnu::java::rmi::server::RMIDefaultSocketFactory : public ::java::rmi::server::RMISocketFactory +{ + +public: + RMIDefaultSocketFactory(); + virtual ::java::net::Socket * createSocket(::java::lang::String *, jint); + virtual ::java::net::ServerSocket * createServerSocket(jint); + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_RMIDefaultSocketFactory__ diff --git a/libjava/gnu/java/rmi/server/RMIHashes.h b/libjava/gnu/java/rmi/server/RMIHashes.h new file mode 100644 index 00000000000..0bb00ec1159 --- /dev/null +++ b/libjava/gnu/java/rmi/server/RMIHashes.h @@ -0,0 +1,37 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_RMIHashes__ +#define __gnu_java_rmi_server_RMIHashes__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class RMIHashes; + } + } + } + } +} + +class gnu::java::rmi::server::RMIHashes : public ::java::lang::Object +{ + +public: + RMIHashes(); + static jlong getMethodHash(::java::lang::reflect::Method *); + static jlong getInterfaceHash(::java::lang::Class *); + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_RMIHashes__ diff --git a/libjava/gnu/java/rmi/server/RMIIncomingThread.h b/libjava/gnu/java/rmi/server/RMIIncomingThread.h new file mode 100644 index 00000000000..5938877f22a --- /dev/null +++ b/libjava/gnu/java/rmi/server/RMIIncomingThread.h @@ -0,0 +1,40 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_RMIIncomingThread__ +#define __gnu_java_rmi_server_RMIIncomingThread__ + +#pragma interface + +#include <java/lang/Thread.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class RMIIncomingThread; + } + } + } + } +} + +class gnu::java::rmi::server::RMIIncomingThread : public ::java::lang::Thread +{ + +public: + RMIIncomingThread(::java::lang::Runnable *, ::java::lang::String *); + virtual ::java::lang::String * toString(); + virtual ::java::lang::String * getClientHost(); +private: + ::java::lang::String * __attribute__((aligned(__alignof__( ::java::lang::Thread)))) clientHost; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_RMIIncomingThread__ diff --git a/libjava/gnu/java/rmi/server/RMIObjectInputStream.h b/libjava/gnu/java/rmi/server/RMIObjectInputStream.h new file mode 100644 index 00000000000..3af69a2889b --- /dev/null +++ b/libjava/gnu/java/rmi/server/RMIObjectInputStream.h @@ -0,0 +1,43 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_RMIObjectInputStream__ +#define __gnu_java_rmi_server_RMIObjectInputStream__ + +#pragma interface + +#include <java/io/ObjectInputStream.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class RMIObjectInputStream; + } + } + } + } +} + +class gnu::java::rmi::server::RMIObjectInputStream : public ::java::io::ObjectInputStream +{ + +public: + RMIObjectInputStream(::java::io::InputStream *); +public: // actually protected + virtual ::java::lang::Class * resolveClass(::java::io::ObjectStreamClass *); + virtual ::java::lang::Object * getAnnotation(); + virtual ::java::lang::Class * resolveProxyClass(JArray< ::java::lang::String * > *); + virtual ::java::lang::Object * readValue(::java::lang::Class *); +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_RMIObjectInputStream__ diff --git a/libjava/gnu/java/rmi/server/RMIObjectOutputStream.h b/libjava/gnu/java/rmi/server/RMIObjectOutputStream.h new file mode 100644 index 00000000000..6f6382d94b3 --- /dev/null +++ b/libjava/gnu/java/rmi/server/RMIObjectOutputStream.h @@ -0,0 +1,42 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_RMIObjectOutputStream__ +#define __gnu_java_rmi_server_RMIObjectOutputStream__ + +#pragma interface + +#include <java/io/ObjectOutputStream.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class RMIObjectOutputStream; + } + } + } + } +} + +class gnu::java::rmi::server::RMIObjectOutputStream : public ::java::io::ObjectOutputStream +{ + +public: + RMIObjectOutputStream(::java::io::OutputStream *); +public: // actually protected + virtual void setAnnotation(::java::lang::String *); + virtual void annotateClass(::java::lang::Class *); + virtual void annotateProxyClass(::java::lang::Class *); + virtual ::java::lang::Object * replaceObject(::java::lang::Object *); + virtual void writeValue(::java::lang::Object *, ::java::lang::Class *); +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_RMIObjectOutputStream__ diff --git a/libjava/gnu/java/rmi/server/RMIVoidValue.h b/libjava/gnu/java/rmi/server/RMIVoidValue.h new file mode 100644 index 00000000000..fab4664a9d4 --- /dev/null +++ b/libjava/gnu/java/rmi/server/RMIVoidValue.h @@ -0,0 +1,37 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_RMIVoidValue__ +#define __gnu_java_rmi_server_RMIVoidValue__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class RMIVoidValue; + } + } + } + } +} + +class gnu::java::rmi::server::RMIVoidValue : public ::java::lang::Object +{ + + RMIVoidValue(); +public: // actually package-private + static ::gnu::java::rmi::server::RMIVoidValue * INSTANCE; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_RMIVoidValue__ diff --git a/libjava/gnu/java/rmi/server/TripleKey.h b/libjava/gnu/java/rmi/server/TripleKey.h new file mode 100644 index 00000000000..dbc2d429b05 --- /dev/null +++ b/libjava/gnu/java/rmi/server/TripleKey.h @@ -0,0 +1,44 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_TripleKey__ +#define __gnu_java_rmi_server_TripleKey__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class TripleKey; + } + } + } + } +} + +class gnu::java::rmi::server::TripleKey : public ::java::lang::Object +{ + +public: // actually package-private + TripleKey(::java::lang::String *, jint, ::java::lang::Object *); +public: + virtual jint hashCode(); + virtual jboolean equals(::java::lang::Object *); + virtual ::java::lang::String * toString(); +public: // actually package-private + ::java::lang::String * __attribute__((aligned(__alignof__( ::java::lang::Object)))) host; + jint port; + ::java::lang::Object * other; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_TripleKey__ diff --git a/libjava/gnu/java/rmi/server/UnicastConnection.h b/libjava/gnu/java/rmi/server/UnicastConnection.h new file mode 100644 index 00000000000..98f5d0d7b14 --- /dev/null +++ b/libjava/gnu/java/rmi/server/UnicastConnection.h @@ -0,0 +1,67 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_UnicastConnection__ +#define __gnu_java_rmi_server_UnicastConnection__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class UnicastConnection; + class UnicastConnectionManager; + } + } + } + } + namespace java + { + namespace net + { + class Socket; + } + } +} + +class gnu::java::rmi::server::UnicastConnection : public ::java::lang::Object +{ + +public: // actually package-private + UnicastConnection(::gnu::java::rmi::server::UnicastConnectionManager *, ::java::net::Socket *); + virtual void acceptConnection(); + virtual void makeConnection(jint); + virtual ::java::io::DataInputStream * getDataInputStream(); + virtual ::java::io::DataOutputStream * getDataOutputStream(); + virtual ::java::io::ObjectInputStream * getObjectInputStream(); + virtual ::java::io::ObjectInputStream * startObjectInputStream(); + virtual ::java::io::ObjectOutputStream * getObjectOutputStream(); + virtual ::java::io::ObjectOutputStream * startObjectOutputStream(); + virtual void disconnect(); + static jboolean isExpired(::gnu::java::rmi::server::UnicastConnection *, jlong); + static void resetTime(::gnu::java::rmi::server::UnicastConnection *); +public: + virtual void run(); +public: // actually package-private + ::gnu::java::rmi::server::UnicastConnectionManager * __attribute__((aligned(__alignof__( ::java::lang::Object)))) manager; + ::java::net::Socket * sock; + ::java::io::DataInputStream * din; + ::java::io::DataOutputStream * dout; + ::java::io::ObjectInputStream * oin; + ::java::io::ObjectOutputStream * oout; + jlong reviveTime; + jlong expireTime; +public: + static const jlong CONNECTION_TIMEOUT = 10000LL; + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_UnicastConnection__ diff --git a/libjava/gnu/java/rmi/server/UnicastConnectionManager$1.h b/libjava/gnu/java/rmi/server/UnicastConnectionManager$1.h new file mode 100644 index 00000000000..cbfd5826f7c --- /dev/null +++ b/libjava/gnu/java/rmi/server/UnicastConnectionManager$1.h @@ -0,0 +1,37 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_UnicastConnectionManager$1__ +#define __gnu_java_rmi_server_UnicastConnectionManager$1__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class UnicastConnectionManager$1; + } + } + } + } +} + +class gnu::java::rmi::server::UnicastConnectionManager$1 : public ::java::lang::Object +{ + +public: // actually package-private + UnicastConnectionManager$1(); +public: + void run(); + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_UnicastConnectionManager$1__ diff --git a/libjava/gnu/java/rmi/server/UnicastConnectionManager.h b/libjava/gnu/java/rmi/server/UnicastConnectionManager.h new file mode 100644 index 00000000000..dd6b828317d --- /dev/null +++ b/libjava/gnu/java/rmi/server/UnicastConnectionManager.h @@ -0,0 +1,94 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_UnicastConnectionManager__ +#define __gnu_java_rmi_server_UnicastConnectionManager__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class UnicastConnection; + class UnicastConnectionManager; + } + } + } + } + namespace java + { + namespace net + { + class ServerSocket; + } + namespace rmi + { + namespace server + { + class RMIClientSocketFactory; + class RMIServerSocketFactory; + class RMISocketFactory; + } + } + } +} + +class gnu::java::rmi::server::UnicastConnectionManager : public ::java::lang::Object +{ + + static void startScavenger(); + UnicastConnectionManager(::java::lang::String *, jint, ::java::rmi::server::RMIClientSocketFactory *); + UnicastConnectionManager(jint, ::java::rmi::server::RMIServerSocketFactory *); +public: + static ::gnu::java::rmi::server::UnicastConnectionManager * getInstance(::java::lang::String *, jint, ::java::rmi::server::RMIClientSocketFactory *); + static ::gnu::java::rmi::server::UnicastConnectionManager * getInstance(jint, ::java::rmi::server::RMIServerSocketFactory *); + virtual ::gnu::java::rmi::server::UnicastConnection * getConnection(); +private: + ::gnu::java::rmi::server::UnicastConnection * getServerConnection(); + ::gnu::java::rmi::server::UnicastConnection * getClientConnection(); +public: + virtual ::java::lang::String * toString(); + virtual void discardConnection(::gnu::java::rmi::server::UnicastConnection *); + virtual void startServer(); + virtual void stopServer(); + virtual void run(); +public: // actually package-private + virtual void write(::java::io::ObjectOutput *); + static ::gnu::java::rmi::server::UnicastConnectionManager * read(::java::io::ObjectInput *); +private: + static ::java::lang::String * localhost; + static ::java::util::Hashtable * servers; +public: // actually package-private + static ::java::util::Hashtable * clients; + ::java::util::ArrayList * __attribute__((aligned(__alignof__( ::java::lang::Object)))) connections; +private: + volatile ::java::lang::Thread * serverThread; + ::java::net::ServerSocket * ssock; +public: // actually package-private + ::java::lang::String * serverName; + jint serverPort; + static ::java::lang::Thread * scavenger; + ::java::lang::Object * serverobj; +private: + static ::java::rmi::server::RMISocketFactory * defaultSocketFactory; + ::java::rmi::server::RMIServerSocketFactory * serverFactory; + ::java::rmi::server::RMIClientSocketFactory * clientFactory; + static jint ncsock; + static jint nssock; + static jint ncmanager; + static jint nsmanager; + static const jboolean debug = 0; + static ::java::lang::Object * GLOBAL_LOCK; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_UnicastConnectionManager__ diff --git a/libjava/gnu/java/rmi/server/UnicastRef.h b/libjava/gnu/java/rmi/server/UnicastRef.h new file mode 100644 index 00000000000..089b35df924 --- /dev/null +++ b/libjava/gnu/java/rmi/server/UnicastRef.h @@ -0,0 +1,91 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_UnicastRef__ +#define __gnu_java_rmi_server_UnicastRef__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class UnicastConnection; + class UnicastConnectionManager; + class UnicastRef; + } + } + } + } + namespace java + { + namespace rmi + { + class Remote; + namespace dgc + { + class Lease; + } + namespace server + { + class ObjID; + class Operation; + class RMIClientSocketFactory; + class RemoteCall; + class RemoteObject; + class RemoteRef; + } + } + } +} + +class gnu::java::rmi::server::UnicastRef : public ::java::lang::Object +{ + +public: + UnicastRef(); + UnicastRef(::java::rmi::server::ObjID *, ::java::lang::String *, jint, ::java::rmi::server::RMIClientSocketFactory *); + UnicastRef(::java::rmi::server::ObjID *); + virtual ::java::lang::Object * invoke(::java::rmi::Remote *, ::java::lang::reflect::Method *, JArray< ::java::lang::Object * > *, jlong); + virtual ::java::rmi::dgc::Lease * notifyDGC(::java::rmi::dgc::Lease *); +public: // actually protected + virtual ::java::lang::Object * invokeCommon(::java::rmi::Remote *, ::java::lang::reflect::Method *, JArray< ::java::lang::Object * > *, jint, jlong); + virtual ::java::lang::Object * invokeCommon(::gnu::java::rmi::server::UnicastConnection *, ::java::rmi::Remote *, ::java::lang::reflect::Method *, JArray< ::java::lang::Object * > *, jint, jlong); +public: + virtual ::java::rmi::server::RemoteCall * newCall(::java::rmi::server::RemoteObject *, JArray< ::java::rmi::server::Operation * > *, jint, jlong); + virtual void invoke(::java::rmi::server::RemoteCall *); + virtual void done(::java::rmi::server::RemoteCall *); + virtual void writeExternal(::java::io::ObjectOutput *); + virtual void readExternal(::java::io::ObjectInput *); + virtual jboolean remoteEquals(::java::rmi::server::RemoteRef *); + virtual jint remoteHashCode(); + virtual ::java::lang::String * getRefClass(::java::io::ObjectOutput *); + virtual ::java::lang::String * remoteToString(); + virtual void dump(::gnu::java::rmi::server::UnicastConnection *); + virtual jboolean equals(::java::lang::Object *); + virtual jint hashCode(); +private: + static const jlong serialVersionUID = 1LL; +public: + ::java::rmi::server::ObjID * __attribute__((aligned(__alignof__( ::java::lang::Object)))) objid; +public: // actually package-private + ::gnu::java::rmi::server::UnicastConnectionManager * manager; + static jlong dgcSequence; + static ::java::rmi::server::ObjID * dgcId; + JArray< ::java::rmi::server::ObjID * > * this_id; + static jint DIRTY; + static const jlong dgcInterfaceHash = -669196253586618813LL; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_UnicastRef__ diff --git a/libjava/gnu/java/rmi/server/UnicastRemoteCall$DummyObjectInputStream.h b/libjava/gnu/java/rmi/server/UnicastRemoteCall$DummyObjectInputStream.h new file mode 100644 index 00000000000..acf348091ca --- /dev/null +++ b/libjava/gnu/java/rmi/server/UnicastRemoteCall$DummyObjectInputStream.h @@ -0,0 +1,64 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_UnicastRemoteCall$DummyObjectInputStream__ +#define __gnu_java_rmi_server_UnicastRemoteCall$DummyObjectInputStream__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class UnicastRemoteCall; + class UnicastRemoteCall$DummyObjectInputStream; + } + } + } + } +} + +class gnu::java::rmi::server::UnicastRemoteCall$DummyObjectInputStream : public ::java::lang::Object +{ + +public: // actually package-private + UnicastRemoteCall$DummyObjectInputStream(::gnu::java::rmi::server::UnicastRemoteCall *); +public: + virtual jboolean readBoolean(); + virtual jbyte readByte(); + virtual jchar readChar(); + virtual jdouble readDouble(); + virtual jfloat readFloat(); + virtual jint readInt(); + virtual jlong readLong(); + virtual jshort readShort(); + virtual ::java::lang::Object * readObject(); + virtual jint read(JArray< jbyte > *); + virtual jint read(JArray< jbyte > *, jint, jint); + virtual jint read(); + virtual jlong skip(jlong); + virtual jint available(); + virtual void readFully(JArray< jbyte > *); + virtual void readFully(JArray< jbyte > *, jint, jint); + virtual ::java::lang::String * readLine(); + virtual ::java::lang::String * readUTF(); + virtual jint readUnsignedByte(); + virtual jint readUnsignedShort(); + virtual jint skipBytes(jint); + virtual void close(); +public: // actually package-private + ::gnu::java::rmi::server::UnicastRemoteCall * __attribute__((aligned(__alignof__( ::java::lang::Object)))) this$0; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_UnicastRemoteCall$DummyObjectInputStream__ diff --git a/libjava/gnu/java/rmi/server/UnicastRemoteCall$DummyObjectOutputStream.h b/libjava/gnu/java/rmi/server/UnicastRemoteCall$DummyObjectOutputStream.h new file mode 100644 index 00000000000..7a903b64631 --- /dev/null +++ b/libjava/gnu/java/rmi/server/UnicastRemoteCall$DummyObjectOutputStream.h @@ -0,0 +1,59 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_UnicastRemoteCall$DummyObjectOutputStream__ +#define __gnu_java_rmi_server_UnicastRemoteCall$DummyObjectOutputStream__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class UnicastRemoteCall; + class UnicastRemoteCall$DummyObjectOutputStream; + } + } + } + } +} + +class gnu::java::rmi::server::UnicastRemoteCall$DummyObjectOutputStream : public ::java::lang::Object +{ + +public: // actually package-private + UnicastRemoteCall$DummyObjectOutputStream(::gnu::java::rmi::server::UnicastRemoteCall *); +public: + virtual void writeBoolean(jboolean); + virtual void writeByte(jint); + virtual void writeChar(jint); + virtual void writeDouble(jdouble); + virtual void writeFloat(jfloat); + virtual void writeInt(jint); + virtual void writeLong(jlong); + virtual void writeShort(jint); + virtual void writeObject(::java::lang::Object *); + virtual void write(JArray< jbyte > *); + virtual void write(JArray< jbyte > *, jint, jint); + virtual void write(jint); + virtual void writeBytes(::java::lang::String *); + virtual void writeChars(::java::lang::String *); + virtual void writeUTF(::java::lang::String *); + virtual void flush(); + virtual void close(); +public: // actually package-private + ::gnu::java::rmi::server::UnicastRemoteCall * __attribute__((aligned(__alignof__( ::java::lang::Object)))) this$0; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_UnicastRemoteCall$DummyObjectOutputStream__ diff --git a/libjava/gnu/java/rmi/server/UnicastRemoteCall.h b/libjava/gnu/java/rmi/server/UnicastRemoteCall.h new file mode 100644 index 00000000000..d6808a6e32e --- /dev/null +++ b/libjava/gnu/java/rmi/server/UnicastRemoteCall.h @@ -0,0 +1,81 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_UnicastRemoteCall__ +#define __gnu_java_rmi_server_UnicastRemoteCall__ + +#pragma interface + +#include <java/lang/Object.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class UnicastConnection; + class UnicastRemoteCall; + } + } + } + } + namespace java + { + namespace rmi + { + namespace server + { + class ObjID; + } + } + } +} + +class gnu::java::rmi::server::UnicastRemoteCall : public ::java::lang::Object +{ + +public: // actually package-private + UnicastRemoteCall(::gnu::java::rmi::server::UnicastConnection *); + UnicastRemoteCall(::gnu::java::rmi::server::UnicastConnection *, ::java::rmi::server::ObjID *, jint, jlong); + virtual ::gnu::java::rmi::server::UnicastConnection * getConnection(); +public: + virtual ::java::io::ObjectOutput * getOutputStream(); + virtual void releaseOutputStream(); + virtual ::java::io::ObjectInput * startInputStream(); + virtual ::java::io::ObjectInput * getInputStream(); + virtual void releaseInputStream(); + virtual ::java::io::ObjectOutput * getResultStream(jboolean); + virtual void executeCall(); + virtual void done(); +public: // actually package-private + virtual jboolean isReturnValue(); + virtual ::java::lang::Object * returnValue(); + virtual JArray< ::java::lang::Object * > * getArguments(); + virtual ::java::lang::Object * getObject(); + virtual jint getOpnum(); + virtual jlong getHash(); + virtual void setReturnValue(::java::lang::Object *); +private: + ::gnu::java::rmi::server::UnicastConnection * __attribute__((aligned(__alignof__( ::java::lang::Object)))) conn; + ::java::lang::Object * result; + ::java::lang::Object * object; + jint opnum; + jlong hash; +public: // actually package-private + ::java::util::Vector * vec; + jint ptr; +private: + ::java::rmi::server::ObjID * objid; + ::java::io::ObjectOutput * oout; + ::java::io::ObjectInput * oin; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_UnicastRemoteCall__ diff --git a/libjava/gnu/java/rmi/server/UnicastRemoteStub.h b/libjava/gnu/java/rmi/server/UnicastRemoteStub.h new file mode 100644 index 00000000000..14c9e5a5a3d --- /dev/null +++ b/libjava/gnu/java/rmi/server/UnicastRemoteStub.h @@ -0,0 +1,47 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_UnicastRemoteStub__ +#define __gnu_java_rmi_server_UnicastRemoteStub__ + +#pragma interface + +#include <java/rmi/server/RemoteStub.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class UnicastRemoteStub; + } + } + } + } + namespace java + { + namespace rmi + { + namespace server + { + class RemoteRef; + class RemoteStub; + } + } + } +} + +class gnu::java::rmi::server::UnicastRemoteStub : public ::java::rmi::server::RemoteStub +{ + +public: + UnicastRemoteStub(); + static void setStubRef(::java::rmi::server::RemoteStub *, ::java::rmi::server::RemoteRef *); + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_UnicastRemoteStub__ diff --git a/libjava/gnu/java/rmi/server/UnicastServer.h b/libjava/gnu/java/rmi/server/UnicastServer.h new file mode 100644 index 00000000000..5ebf3633c9a --- /dev/null +++ b/libjava/gnu/java/rmi/server/UnicastServer.h @@ -0,0 +1,74 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_UnicastServer__ +#define __gnu_java_rmi_server_UnicastServer__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace dgc + { + class DGCImpl; + } + namespace server + { + class ActivatableServerRef; + class UnicastConnection; + class UnicastServer; + class UnicastServerRef; + } + } + } + } + namespace java + { + namespace rmi + { + class Remote; + namespace activation + { + class ActivationID; + } + } + } +} + +class gnu::java::rmi::server::UnicastServer : public ::java::lang::Object +{ + +public: + UnicastServer(); + static void exportObject(::gnu::java::rmi::server::UnicastServerRef *); + static void registerActivatable(::gnu::java::rmi::server::ActivatableServerRef *); + static void exportActivatableObject(::gnu::java::rmi::server::ActivatableServerRef *); + static ::gnu::java::rmi::server::ActivatableServerRef * getActivatableRef(::java::rmi::activation::ActivationID *); + static void unregisterActivatable(::java::rmi::activation::ActivationID *); + static jboolean unexportObject(::gnu::java::rmi::server::UnicastServerRef *, jboolean); + static ::gnu::java::rmi::server::UnicastServerRef * getExportedRef(::java::rmi::Remote *); + static ::java::util::Collection * getExported(::java::lang::Object *); +private: + static void startDGC(); +public: + static void dispatch(::gnu::java::rmi::server::UnicastConnection *); +private: + static void incomingMessageCall(::gnu::java::rmi::server::UnicastConnection *); + static ::java::util::Map * objects; + static ::java::util::Map * refcache; +public: + static ::java::util::Map * actIds; +private: + static ::gnu::java::rmi::dgc::DGCImpl * dgc; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_UnicastServer__ diff --git a/libjava/gnu/java/rmi/server/UnicastServerRef.h b/libjava/gnu/java/rmi/server/UnicastServerRef.h new file mode 100644 index 00000000000..62299d9cde2 --- /dev/null +++ b/libjava/gnu/java/rmi/server/UnicastServerRef.h @@ -0,0 +1,80 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_rmi_server_UnicastServerRef__ +#define __gnu_java_rmi_server_UnicastServerRef__ + +#pragma interface + +#include <gnu/java/rmi/server/UnicastRef.h> +#include <gcj/array.h> + +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace rmi + { + namespace server + { + class UnicastConnection; + class UnicastServerRef; + } + } + } + } + namespace java + { + namespace rmi + { + class Remote; + namespace server + { + class ObjID; + class RMIServerSocketFactory; + class RemoteRef; + class Skeleton; + } + } + } +} + +class gnu::java::rmi::server::UnicastServerRef : public ::gnu::java::rmi::server::UnicastRef +{ + +public: // actually package-private + UnicastServerRef(); +public: + UnicastServerRef(::java::rmi::server::ObjID *, jint, ::java::rmi::server::RMIServerSocketFactory *); + virtual ::java::rmi::Remote * exportObject(::java::rmi::Remote *); + virtual ::java::rmi::Remote * getStub(); + virtual jboolean unexportObject(::java::rmi::Remote *, jboolean); +public: // actually protected + virtual ::java::lang::Class * findStubSkelClass(::java::lang::Class *); + virtual ::java::lang::Object * getHelperClass(::java::lang::Class *, ::java::lang::String *); +public: + virtual ::java::lang::String * getClientHost(); +public: // actually protected + virtual void buildMethodHash(::java::lang::Class *, jboolean); +public: // actually package-private + virtual ::java::lang::Class * getMethodReturnType(jint, jlong); +public: + virtual ::java::lang::Object * incomingMessageCall(::gnu::java::rmi::server::UnicastConnection *, jint, jlong); +public: // actually package-private + virtual ::java::rmi::Remote * createProxyStub(::java::lang::Class *, ::java::rmi::server::RemoteRef *); +private: + static const jlong serialVersionUID = -5585608108300801246LL; + static JArray< ::java::lang::Class * > * stubprototype; +public: // actually package-private + ::java::rmi::Remote * __attribute__((aligned(__alignof__( ::gnu::java::rmi::server::UnicastRef)))) myself; +public: // actually protected + ::java::rmi::server::Skeleton * skel; + ::java::rmi::Remote * stub; + ::java::util::Hashtable * methods; +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_rmi_server_UnicastServerRef__ |