(informal protocol)
| Framework | /System/Library/Frameworks/WebKit.framework |
| Availability | Available in Mac OS X v10.3.9 and later.
|
| Companion guide | |
| Declared in | WebJavaPlugIn.h |
The WebJavaPlugIn protocol adds the following additional methods—not defined in the WebPlugIn informal protocol—to facilitate JNI access to the Java virtual machine via the plug-in.
– webPlugInGetApplet
– webPlugInCallJava:isStatic:returnType:method:arguments:callingURL:exceptionDescription:
Sends a message directly to a Java object in a plug-in.
- (jvalue)webPlugInCallJava:(jobject)object isStatic:(BOOL)isStatic returnType:(WebJNIReturnType)returnType method:(jmethodID)method arguments:(jvalue *)arguments callingURL:(NSURL *)url exceptionDescription:(NSString **)exceptionString
Sends the message, specified by method, to the Java instance, specified by object, using the arguments specified by arguments. If isStatic is YES, method is expected to be a class method. The returnType argument specifies the return type of the Java method. The url argument specifies the URL for the page that contains the JavaScript that is calling Java. If an exception is thrown by Java, exceptionString will be set to a description of the exception. Pass nil if you don’t want the exception description.
This method is preferred over using JNI to send messages to Java applets, and is required to guarantee the correct thread will receive the message. Always invoke this method from within the main thread.
WebJavaPlugIn.hReturns a jobject that represents a Java applet in a WebPlugInContainer.
- (jobject)webPlugInGetApplet
Always invoke this method from within the main thread.
WebJavaPlugIn.h
Last updated: 2006-05-23