Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Next Page > Hide TOC

WebJavaPlugIn Protocol Reference

(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

Overview

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.

Tasks

Getting and Setting Java Applets

Instance Methods

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

Discussion

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.

Availability
See Also
Declared In
WebJavaPlugIn.h

webPlugInGetApplet

Returns a jobject that represents a Java applet in a WebPlugInContainer.

- (jobject)webPlugInGetApplet

Discussion

Always invoke this method from within the main thread.

Availability
See Also
Declared In
WebJavaPlugIn.h

Next Page > Hide TOC


Last updated: 2006-05-23




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice