From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- .../sun/star/java/InvalidJavaSettingsException.idl | 44 ++++++++ udkapi/com/sun/star/java/JavaDisabledException.idl | 43 ++++++++ .../sun/star/java/JavaInitializationException.idl | 51 +++++++++ .../sun/star/java/JavaNotConfiguredException.idl | 42 ++++++++ udkapi/com/sun/star/java/JavaNotFoundException.idl | 40 +++++++ .../star/java/JavaVMCreationFailureException.idl | 53 ++++++++++ udkapi/com/sun/star/java/JavaVirtualMachine.idl | 41 ++++++++ .../sun/star/java/MissingJavaRuntimeException.idl | 45 ++++++++ .../com/sun/star/java/RestartRequiredException.idl | 40 +++++++ .../sun/star/java/WrongJavaVersionException.idl | 52 +++++++++ .../com/sun/star/java/XJavaThreadRegister_11.idl | 58 +++++++++++ udkapi/com/sun/star/java/XJavaVM.idl | 116 +++++++++++++++++++++ 12 files changed, 625 insertions(+) create mode 100644 udkapi/com/sun/star/java/InvalidJavaSettingsException.idl create mode 100644 udkapi/com/sun/star/java/JavaDisabledException.idl create mode 100644 udkapi/com/sun/star/java/JavaInitializationException.idl create mode 100644 udkapi/com/sun/star/java/JavaNotConfiguredException.idl create mode 100644 udkapi/com/sun/star/java/JavaNotFoundException.idl create mode 100644 udkapi/com/sun/star/java/JavaVMCreationFailureException.idl create mode 100644 udkapi/com/sun/star/java/JavaVirtualMachine.idl create mode 100644 udkapi/com/sun/star/java/MissingJavaRuntimeException.idl create mode 100644 udkapi/com/sun/star/java/RestartRequiredException.idl create mode 100644 udkapi/com/sun/star/java/WrongJavaVersionException.idl create mode 100644 udkapi/com/sun/star/java/XJavaThreadRegister_11.idl create mode 100644 udkapi/com/sun/star/java/XJavaVM.idl (limited to 'udkapi/com/sun/star/java') diff --git a/udkapi/com/sun/star/java/InvalidJavaSettingsException.idl b/udkapi/com/sun/star/java/InvalidJavaSettingsException.idl new file mode 100644 index 000000000..85297053d --- /dev/null +++ b/udkapi/com/sun/star/java/InvalidJavaSettingsException.idl @@ -0,0 +1,44 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_java_InvalidJavaSettingsException_idl__ +#define __com_sun_star_java_InvalidJavaSettingsException_idl__ + +#include + +module com { module sun { module star { module java { + + +/** indicates the Java settings have been modified. + +

The Java framework uses a configuration file, which can be used + by distributors to determine what versions are supported. If this + file is modified, then the current settings are regarded as invalid.

+ + @since OOo 2.0 + */ +exception InvalidJavaSettingsException: JavaInitializationException +{ +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/java/JavaDisabledException.idl b/udkapi/com/sun/star/java/JavaDisabledException.idl new file mode 100644 index 000000000..a8673b519 --- /dev/null +++ b/udkapi/com/sun/star/java/JavaDisabledException.idl @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_java_JavaDisabledException_idl__ +#define __com_sun_star_java_JavaDisabledException_idl__ + +#include + +module com { module sun { module star { module java { + + +/** indicates that Java could not be initialized because it has + been switched off.

+ The user has switched off Java in the configuration of the office, + for example by means of the options dialog. + + @since OOo 1.1.2 + */ +published exception JavaDisabledException: JavaInitializationException +{ +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/java/JavaInitializationException.idl b/udkapi/com/sun/star/java/JavaInitializationException.idl new file mode 100644 index 000000000..5021f1536 --- /dev/null +++ b/udkapi/com/sun/star/java/JavaInitializationException.idl @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_java_JavaInitializationException_idl__ +#define __com_sun_star_java_JavaInitializationException_idl__ + +#include + +module com { module sun { module star { module java { + + +/** indicates that there is no Java available

+ It is presumed that Java is a vital part of an office installation. + That is, if Java does work for some reason, it is not guaranteed that + the office is functional. A JavaInitializationException is therefore + caused by some misconfiguration of Java which is closer described by + other exceptions in this namespace which inherit JavaInitializationException. + These are: +

+ com::sun::star::java::JavaDisabledException
+ com::sun::star::java::JavaNotConfiguredException
+ com::sun::star::java::MissingJavaRuntimeException
+ com::sun::star::java::JavaVMCreationFailureException
+ + @since OOo 1.1.2 + */ +published exception JavaInitializationException: com::sun::star::uno::DeploymentException +{ +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/java/JavaNotConfiguredException.idl b/udkapi/com/sun/star/java/JavaNotConfiguredException.idl new file mode 100644 index 000000000..001715aac --- /dev/null +++ b/udkapi/com/sun/star/java/JavaNotConfiguredException.idl @@ -0,0 +1,42 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_java_JavaNotConfiguredException_idl__ +#define __com_sun_star_java_JavaNotConfiguredException_idl__ + +#include + +module com { module sun { module star { module java { + + +/** indicates that the user did not configure Java for an Office installation.

+ This exception occurs if there is no java.ini or javarc available. This usually + happens if a user cancels the Java configuration which of the office. + + @since OOo 1.1.2 + */ +published exception JavaNotConfiguredException: JavaInitializationException +{ +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/java/JavaNotFoundException.idl b/udkapi/com/sun/star/java/JavaNotFoundException.idl new file mode 100644 index 000000000..76566cd28 --- /dev/null +++ b/udkapi/com/sun/star/java/JavaNotFoundException.idl @@ -0,0 +1,40 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_java_JavaNotFoundException_idl__ +#define __com_sun_star_java_JavaNotFoundException_idl__ + +#include + +module com { module sun { module star { module java { + + +/** indicates that no suitable JRE was found. + + @since OOo 2.0 + */ +exception JavaNotFoundException: JavaInitializationException +{ +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/java/JavaVMCreationFailureException.idl b/udkapi/com/sun/star/java/JavaVMCreationFailureException.idl new file mode 100644 index 000000000..2c2bab903 --- /dev/null +++ b/udkapi/com/sun/star/java/JavaVMCreationFailureException.idl @@ -0,0 +1,53 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_java_JavaVMCreationFailureException_idl__ +#define __com_sun_star_java_JavaVMCreationFailureException_idl__ + +#include + +module com { module sun { module star { module java { + + +/** indicates that the Java Virtual Machine could not be created

+ This exception can be thrown when the creation of the Java Virtual + Machine failed, even if the runtime library could be loaded. + Possible reasons for a failure are that JNI_CreateJavaVM returns + an error code that reflects a failure, JNI_CreateJavaVM does not + return because it tries to quit the process ( _exit), the shared + library is corrupted, so that the symbols for JNI_GetDefaultVMInitArgs + or JNI_CreateJavaVM cannot be found, etc. + + @since OOo 1.1.2 + */ +published exception JavaVMCreationFailureException: JavaInitializationException +{ + /** contains an error code that reflects the returned error code of + JNI_CreateJavaVM or other errors. A negative value represents + the returned error code of JNI_CreateJavaVM. All other values + indicate a different cause. + */ + long ErrorCode; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/java/JavaVirtualMachine.idl b/udkapi/com/sun/star/java/JavaVirtualMachine.idl new file mode 100644 index 000000000..e5d049d21 --- /dev/null +++ b/udkapi/com/sun/star/java/JavaVirtualMachine.idl @@ -0,0 +1,41 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_java_JavaVirtualMachine_idl__ +#define __com_sun_star_java_JavaVirtualMachine_idl__ + +#include + +module com { module sun { module star { module java { + + +/** Exports interfaces to handle a Java VM. + + @deprecated + A UNO service seems to be at the wrong abstraction level for this + functionality. This should probably be replaced by an appropriate C/C++ + API. + */ +published service JavaVirtualMachine : XJavaVM; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/java/MissingJavaRuntimeException.idl b/udkapi/com/sun/star/java/MissingJavaRuntimeException.idl new file mode 100644 index 000000000..563b0b270 --- /dev/null +++ b/udkapi/com/sun/star/java/MissingJavaRuntimeException.idl @@ -0,0 +1,45 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_java_MissingJavaRuntimeException_idl__ +#define __com_sun_star_java_MissingJavaRuntimeException_idl__ + +#include + +module com { module sun { module star { module java { + + +/** indicates that the Java runtime library could not be found.

+ This happens when a user moves or deletes a Java installation after + the office has been configured to use that Java installation. + + @since OOo 1.1.2 + */ +published exception MissingJavaRuntimeException: JavaInitializationException +{ + /** contains the path to the runtime lib as file URL. + */ + string URLRuntimeLib; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/java/RestartRequiredException.idl b/udkapi/com/sun/star/java/RestartRequiredException.idl new file mode 100644 index 000000000..437f43925 --- /dev/null +++ b/udkapi/com/sun/star/java/RestartRequiredException.idl @@ -0,0 +1,40 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_java_RestartRequiredException_idl__ +#define __com_sun_star_java_RestartRequiredException_idl__ + +#include + +module com { module sun { module star { module java { + + +/** indicates that the office must be restarted before a JRE can be used. + + @since OOo 2.0 + */ +exception RestartRequiredException: JavaInitializationException +{ +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/java/WrongJavaVersionException.idl b/udkapi/com/sun/star/java/WrongJavaVersionException.idl new file mode 100644 index 000000000..2e5d0e312 --- /dev/null +++ b/udkapi/com/sun/star/java/WrongJavaVersionException.idl @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef __com_sun_star_java_WrongJavaVersionException_idl__ +#define __com_sun_star_java_WrongJavaVersionException_idl__ + +#include + +module com { module sun { module star { module java { + +/** indicates that an operation involving Java (probably executing Java code) + failed due to a wrong Java version. + */ +published exception WrongJavaVersionException: com::sun::star::uno::Exception +{ + /** contains the lowest Java version for which the operation would + succeed, or is left empty if this is unknown. + */ + string LowestSupportedVersion; + + /** contains the highest Java version for which the operation would + succeed, or is left empty if this is unknown. + */ + string HighestSupportedVersion; + + /** contains the Java version that has been detected, or is left empty if + this is unknown. + */ + string DetectedVersion; +}; + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/java/XJavaThreadRegister_11.idl b/udkapi/com/sun/star/java/XJavaThreadRegister_11.idl new file mode 100644 index 000000000..a8ce9fa11 --- /dev/null +++ b/udkapi/com/sun/star/java/XJavaThreadRegister_11.idl @@ -0,0 +1,58 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_java_XJavaThreadRegister_11_idl__ +#define __com_sun_star_java_XJavaThreadRegister_11_idl__ + +#include + + + +module com { module sun { module star { module java { + +/** must be implemented by the user of the XJavaThreadRegister_11. + + @note incomplete + @deprecated + */ +published interface XJavaThreadRegister_11: com::sun::star::uno::XInterface +{ + /** returns `TRUE` if the current thread is already attached to the VM otherwise `FALSE`. + */ + boolean isThreadAttached(); + + /** registers the current thread. + +

This method should be called every time a JNI function is called from Java.

+ */ + void registerThread(); + + + /** revokes the current thread from the list of registered threads. + +

This method should be called at the end of every JNI call from Java.

+ */ + void revokeThread(); +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/udkapi/com/sun/star/java/XJavaVM.idl b/udkapi/com/sun/star/java/XJavaVM.idl new file mode 100644 index 000000000..30f7e5c7d --- /dev/null +++ b/udkapi/com/sun/star/java/XJavaVM.idl @@ -0,0 +1,116 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef __com_sun_star_java_XJavaVM_idl__ +#define __com_sun_star_java_XJavaVM_idl__ + +#include + + +module com { module sun { module star { module java { + +/** must be implemented by the user of the XJavaVM. + + @deprecated + A UNO interface seems to be at the wrong abstraction level for this + functionality (also, the C++ classes jvmaccess::VirtualMachine + and jvmaccess::UnoVirtualMachine used by + com::sun::star::java::XJavaVM::getJavaVM() are not + part of the public C++ UNO runtime API). This should probably be replaced + by an appropriate C/C++ API. + */ +published interface XJavaVM: com::sun::star::uno::XInterface +{ + /** returns the address of the Java Virtual Machine. + +

If the VM is not already instantiated, it will be now.

+ +

If the processID is a normal 16-byte ID, the returned + `any` contains a JNI JavaVM pointer as a + `long` or `hyper` integer (depending on the + platform). If the processID does not match the current + process, or if the VM cannot be instantiated for whatever reason, a + `VOID` `any` is returned.

+ +

If the processID has an additional 17th byte of + value 0, the returned `any` contains a + non–reference-counted pointer to a (reference-counted) instance of + the C++ jvmaccess::VirtualMachine class, always represented + as a `hyper` integer. The pointer is guaranteed to be valid + as long as the reference to this + com::sun::star::java::XJavaVM is valid (but the + pointer should be converted into a reference-counted reference as soon + as possible). Again, if the first 16 bytes of the + processID do not match the current process, or if the VM + cannot be instantiated for whatever reason, a `VOID` `any` + is returned.

+ +

If the processID has an additional 17th byte of + value 1, the returned `any` contains a + non–reference-counted pointer to a (reference-counted) instance of + the C++ jvmaccess::UnoVirtualMachine class, always + represented as a `hyper` integer. The pointer is guaranteed + to be valid as long as the reference to this + com::sun::star::java::XJavaVM is valid. Again, if + the first 16 bytes of the processID do not match the + current process, or if the VM cannot be instantiated for whatever + reason, a `VOID` `any` is returned.

+ +

The first form (returning a JNI JavaVM pointer) is + mainly for backwards compatibility, new code should use the second form + (returning a pointer to a jvmaccess::VirtualMachine) if it + does not want to use the Java UNO environment, and it should use the + third form (returning a pointer to a + jvmaccess::UnoVirtualMachine) if it wants to use the Java + UNO environment. For example, one advantage of using + jvmaccess::VirtualMachine instead of the raw + JavaVM pointer is that whenever you attach a native thread + to the Java virtual machine, that thread's context + ClassLoader (see + java.lang.Thread.getContextClassLoader) will automatically + be set to a meaningful value.

+ + @param processID + The process ID of the caller's process, possibly extended by a 17th byte + of value 0 or 1. + + @return + On success, the `any` contains a pointer represented as + `long` or `hyper`, otherwise the `any` + is `VOID`. + */ + any getJavaVM( [in] sequence processID ); + + /** returns `TRUE` if the VM is started successfully, otherwise `FALSE`. + */ + boolean isVMStarted(); + + /** Returns `TRUE` if the VM is enabled. + +

It is only possible to get the VM, if this method return 0.

+ */ + boolean isVMEnabled(); + +}; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3