PATH  WebObjects 4.5 Documentation > EODistribution Reference

Table of Contents

WOJavaClientApplet


Inherits from: WOComponent
Declared in: EOJavaClient/EODistributionContext.h




Class Description


WOJavaClientApplet is the web component used by Java Client applications to create and download to the client an applet of class com.apple.client.interface.EOApplet. This component passes several parameters to the applet, including the dimensions, code/codebase, and additional EOApplication-specific parameters-such as the initial EOInterfaceController subclass name and language.

WOJavaClientApplet is able to generate the HTML required by SunSoft's Java Plug-in for Microsoft's Internet Explorer and Netscape's browsers. The plug-in is usually required for Netscape, while Internet Explorer often works without it (whether or not the plug-in is required depends on the applet's contents).

Java Client applications can be started outside of a web browser using the following command-line syntax:

java -classpath path_list com.apple.client.eointerface.EOApplication application_url

When a Java Client application is started outside of a browser, the WOJavaClientApplet is still used on the server side to determine the additional EOApplication-specific parameters. Thus the bindings listed below can still apply even in the absence of a web browser.

The following tables lists those bindings used by WOJavaClientApplet:


Binding Description
width Width of applet in the HTML page.
height Height of applet in the HTML page.
useJavaPlugin If this flag is YES, the WOJavaClientApplet generates HTML that causes Internet Explorer and Netscape's browsers to use SunSoft's Java Plug-in.
archive Standard applet parameter.
code Standard applet parameter.
codebase Standard applet parameter.
distributionContext The EODistributionContext used by the applet to handle requests from the client. If the WOJavaClientApplet does not have a binding for the distribution context, it instantiates one with the session's defaultEditingContext, sets the session as the delegate of the distribution context, and itself as the invocation target.
interfaceControllerClassName The class name of the initial EOInterfaceController subclass that becomes visible when an application is launched (in the applet if launched inside a browser).
applicationClassName (Objective-C only) The class name of the EOApplication subclass used for the shared application object.
language The preferred language for the application.
channelClassName The class name of the distribution channel to be used by the client.




Constants


EODistribution defines the following NSString constants in WOJavaClientApplet.h. Each constant corresponds to a WOJavaClientApplet binding and is a key for use in the dictionary returned by clientSideRequestApplicationParameters.


Constant Corresponding Binding
EOWidthKey width
EOHeightKey height
EOUseJavaPluginKey useJavaPlugin
EOArchiveKey archive
EOCodeKey code
EOCodebaseKey codebase
EODistributionContextKey distributionContext
EOInterfaceControllerClassNameKey interfaceControllerClassName
EOApplicationClassNameKey applicationClassName
EOLanguageKey language
EOChannelClassNameKey channelClassName

The WOJavaClientApplet.h header defines the following additional NSString constants.


Constant Description
EOAllParameterNamesKey Used internally to collect the names of all HTML parameters passed to the client (the names of all bindings of the WOJavaClientApplet), including any additional bindings that you add to the applet.
EOSessionIDKey Used internally to identify the session with which the server side EODistributionContext is associated.
EOComponentURLKey Used internally to identify the WOJavaClientApplet component on the server side which corresponds to the EOApplet on the client side.

The WOJavaClientApplet.h header also defines NSString constants for the names of the notifications it posts. For more information, see "Notifications" .



Instance Methods



applicationClassName

- (NSString *)applicationClassName

Returns the value for the applicationClassName binding. This binding identifies the name of the EOApplication subclass used for the shared application object.

See Also: - channelClassName, - clientSideRequestApplicationParameters, - interfaceControllerClassName



archive

- (NSString *)archive

If the applet has a binding for archive, the value of that binding is returned. Otherwise, the default archive binding-"eojavaclient.jar"-is returned.

channelClassName

- (NSString *)channelClassName

Returns the string value bound to the channelClassName binding. The channelClassName identifies the class of the object that the client uses for a distribution channel.

See Also: - applicationClassName, - interfaceControllerClassName



clientSideRequestApplicationParameters

- (NSDictionary *)clientSideRequestApplicationParameters

Returns a dictionary with the values of all the bindings that have been set. This method is used by EOApplication on the client to warm up a Java application started outside of a browser.

See Also: - applicationClassName, - interfaceControllerClassName



code

- (NSString *)code

If the applet has a binding for code, the value of that binding is returned. Otherwise, the default code binding-"com.apple.client.eointerface.EOApplet"-is returned.

codebase

- (NSString *)codebase

If the applet has a binding for codebase, the value of that binding is returned. Otherwise, this method checks to see if the request came through a web server and, if so, returns a URL relative to cgi-bin/WebObjects for the resource request handler. If the request didn't come through a web server, this method returns "/WebObjects/Java".

distributionContext

- (EODistributionContext *)distributionContext

Returns the EODistributionContext used by this component to handle client requests.

handleClientRequest

- (id)handleClientRequest

Using the component's EODistributionContext, generates a response for a client request.

See Also: - responseToClientMessage: ( EODistributionContext class)



interfaceControllerClassName

- (NSString *)interfaceControllerClassName

Returns the value bound to interfaceControllerClassName.

See Also: - applicationClassName, - channelClassName, - clientSideRequestApplicationParameters




Notifications


WOJavaClientAppletDidVendComponentURLNotification

Posted after the WOJavaClientApplet vends a component URL. The notification contains:
Notification Object The WOJavaClientApplet that vended a component URL.
Userinfo None

WOJavaClientAppletWillDeallocNotification

Posted whenever the WOJavaClientApplet is about to be deallocated. The notification contains:
Notification Object The WOJavaClientApplet that's about to be deallocated.
Userinfo None



Table of Contents