Back to index

nordugrid-arc-nox  1.1.0~rc6
javawrapper.h
Go to the documentation of this file.
00001 #ifndef __ARC_SERVICE_JAVA_WRAPPER_H__
00002 #define __ARC_SERVICE_JAVA_WRAPPER_H__
00003 
00004 #ifdef HAVE_JNI_H
00005 #include <jni.h>
00006 #else
00007 #ifdef HAVE_JAVAVM_JNI_H
00008 #include <JavaVM/jni.h>
00009 #endif
00010 #endif
00011 
00012 #include <arc/message/Service.h>
00013 #include <arc/Logger.h>
00014 
00015 namespace Arc {
00016 class Service_JavaWrapper: public Arc::Service {
00017     protected:
00018         Glib::Module *libjvm;
00019         JavaVM *jvm;
00020         char* classPath;
00021         jclass serviceClass;
00022         jobject serviceObj;
00023         
00024         Arc::MCC_Status make_fault(Arc::Message& outmsg);
00025         Arc::MCC_Status java_error(JNIEnv *jenv, const char *str);
00026        static Arc::Logger logger;
00027     public:
00028         Service_JavaWrapper(Arc::Config *cfg);
00029         virtual ~Service_JavaWrapper(void);
00031         virtual Arc::MCC_Status process(Arc::Message&, Arc::Message&);
00032 };
00033 
00034 } // namespace Arc
00035 
00036 #endif // __ARC_SERVICE_JAVA_WRAPPER_H__