WebObjects 5.2

com.webobjects.eodistribution
Class WOJavaClientApplet

java.lang.Object
  |
  +--com.webobjects.appserver.WOElement
        |
        +--com.webobjects.appserver.WOComponent
              |
              +--com.webobjects.eodistribution.WOJavaClientApplet
All Implemented Interfaces:
Cloneable, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, WOActionResults

Deprecated. So far, Applets have been used for starting and downloading a JavaClient application from a web browser. With Sun's new WebStart technology (which is supported by MacOS X version 10.1.2 upwards), in addition to the advantages of applets, the runtime environment of applications will be independent of the web browser, and automatic download/caching/update capabilities provide a major improvement. WebStart is supported by WOJavaClientComponent and related classes.

public class WOJavaClientApplet
extends WOComponent

WOJavaClientApplet is the web component used by Java Client applications to create and download to the client an applet of class com.webobjects.eoapplication.EOApplet. It passes the applet, several parameters to including the dimensions, code/codebase, and additional EOApplication specific parameters like the initial EOInterfaceController subclass name and language.

WOJavaClientApplet is able to generate the HTML required to use Sun's Java Plugin in Internet Explorer and Netscape browsers on Windows which is required to run Java Client applications on that platform (WebObjects does not work with the fairly old Java VMs coming directly with the browsers). On Mac OS X the plugin is not needed since Java applets running in browsers use the native Mac OS X Java VM. If the useJavaPlugin binding is set to true, WOJavaClientApplets automatically generates HTML containing some JavaScript to conditionally use the Java Plugin or not, depending on the platform.

If the Java Client application is started outside a browser as a desktop java application (which is strongly recommended), the WOJavaClientApplet is still used on the server side to determine the additional EOApplication specific parameters and to handle the communication with the client application. That way there is only one place on the server side to configure the client, independent of the client deployment mode.

WOJavaClientApplets sends the values of all bindings to the client (whether it's running as a desktop application or as an applet), even if you add additional bindings. The values of these bindings will be available on the client side through the arguments method of the EOApplication instance. Thus you can use the WOJavaClientApplet to create arguments for the client, again independent of the deployment mode.

Standard Bindings of WOJavaClientApplet

The following bindings are used only for applets and ignored by clients running as desktop applications:

width The width of the applet.
height The height of the applet.
archive The archive (jar file) of the applet. If the binding is not specified, defaults to wojavaclient.jar.
code The code (applet class) of the applet. If the binding is not specified, defaults to com.webobjects.eoapplication.EOApplet.
codebase The codebase of the applet. If not specified, defaults to a URL appropriate for downloading classes through the application's resource manager.
useJavaPlugin Flag which determines whether WOJavaClientApplet should generate HTML for using Sun's Java Plug-in (conditionally on Windows) or just a plain APPLET tag.

The following bindings are used by all Java Client applications:

interfaceControllerClassName The class name of the initial EOInterfaceController subclass. If specified, the client will automatically instantiate and run an instance of the specified class (which has to be a subclass of EOInterfaceController) during startup. For simple, one window applications this is all you need to specify to initialize the user interface.
applicationClassName The class name of the EOApplication instance. If not specified, defaults to com.webobjects.eoapplication.EOApplication. For Direct to Java Client applications, you have to set the value to com.webobjects.eogeneration.client.EODynamicApplication (or your own subclass).
applicationName The name of the client application.
splashIconName The name of an icon to be displayed in a splash screen window during startup.
splashIconURL The URL of an icon to be displayed in a splash screen window during startup.
language The language to run the client with.
channelClassName The class name of the distribution channel to be used by the client. If not specified, defaults to the standard Java Client HTTP channel. If a client is running as a desktop application, this parameter also has to be specified as a command line argument. Specifying it in the WOJavaClientApplet is not sufficient since a connection with a distribution channel is already established when the arguments are read from the WOJavaClientApplet (a distribution channel has to be instantiated before arguments are read from the WOJavaClientApplet).

The following bindings are used only by clients running as desktop applications and are ignored by clients running as applets:

downloadClientClasses This binding is used to determine which classes should be downloaded before the client application really starts up. You usually bind this binding to methods on the WOJavaClientApplet by specifying one of the string values noDownloadClientClasses (default if binding is not specified at all), mainBundleClientClasses, customFrameworksClientClasses, or customBundlesClientClasses. If not specified, no classes are downloaded.
downloadClientClassURLs The URLs from where to download the classes specified through the downloadClientClasses binding. You only need to specify this binding if you have special needs, the URLs can usually be determined automatically.

The following bindings are special:

distributionContext This binding is a server side only binding which is not sent to clients. You can use it to specify a different EODistributionContext (or subclass) to be used by the WOJavaClientApplet on the server side than the default one. If not specified, the default distribution context is an EODistributionContext with the session's default editing context and the session itself as delegate.
temporaryGIDBase This binding is used to generate unique values for temporary global IDs. Do not modify or remove this binding.

See Also:
Serialized Form

Inner classes inherited from class com.webobjects.appserver.WOComponent
WOComponent.Event
 
Inner classes inherited from class com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor
 
Inner classes inherited from class com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Inner classes inherited from class com.webobjects.foundation.NSValidation
NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
Field Summary
static String AllParameterNamesKey
          Deprecated. The name of the client side parameter containing all parameter names.
static String ApplicationClassNameKey
          Deprecated. The name of the applicationClassName binding.
static String ApplicationNameKey
          Deprecated. The name of the applicationName binding.
static String ApplicationURLKey
          Deprecated. The name of the client side parameter containing the application URL.
static String ArchiveKey
          Deprecated. The name of the archive binding.
static String ChannelClassNameKey
          Deprecated. The name of the channelClassName binding.
static String CodebaseKey
          Deprecated. The name of the codebase binding.
static String CodeKey
          Deprecated. The name of the code binding.
static String ComponentURLKey
          Deprecated. The name of the client side parameter containing the component URL of the WOJavaClientApplet.
static String DidVendComponentURLNotification
          Deprecated. The name of the notification sent when the WOJavaClientApplet determines its component URL.
static String DistributionContextKey
          Deprecated. The name of the distributionContext binding.
static String DownloadClientClassesKey
          Deprecated. The name of the downloadClientClasses binding.
static String DownloadClientClassURLsKey
          Deprecated. The name of the downloadClientClassURLs binding.
static String HeightKey
          Deprecated. The name of the height binding.
static String InterfaceControllerClassNameKey
          Deprecated. The name of the interfaceControllerClassName binding.
static String LanguageKey
          Deprecated. The name of the language binding.
 String otherParameterName
          Deprecated. A public variable used in a repetition to create a list of all non-standard bindings.
static String PluginCodebaseKey
          Deprecated. The name of the pluginCodebase binding.
static String PrincipalClassNamesKey
          Deprecated. The name of the principalClassNames binding.
static String SessionIDKey
          Deprecated. The name of the client side parameter containing the session ID.
static String SplashIconNameKey
          Deprecated. The name of the splashIconName binding.
static String SplashIconURLKey
          Deprecated. The name of the splashIconURL binding.
static String TemporaryGIDBaseKey
          Deprecated. The name of the temporaryGIDBase binding.
static String UseJavaPluginKey
          Deprecated. The name of the useJavaPlugin binding.
static String WidthKey
          Deprecated. The name of the width binding.
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
KeyPathSeparator
 
Constructor Summary
WOJavaClientApplet(WOContext context)
          Deprecated. Creates a new WOJavaClientApplet in a given context.
 
Method Summary
 String allParameterNamesString()
          Deprecated. Returns a string containing all of the receiver's client binding names separated by spaces.
 String applicationClassName()
          Deprecated. Returns the value of the applicationClassName binding.
 String applicationName()
          Deprecated. Returns the value of the applicationName binding or a default application name if the binding is not specified.
 String applicationURL()
          Deprecated. Returns a string containing the application URL the client uses to communicate with the WOJavaClientApplet.
 String archive()
          Deprecated. Returns the Java archive (.jar file) to be used by applet clients.
 String channelClassName()
          Deprecated. Returns the value of the channelClassName binding.
 NSDictionary clientSideRequestApplicationParameters()
          Deprecated. Returns a dictionary with the values of all the client bindings that have been set.
 String code()
          Deprecated. Returns the name of the applet class to be used by applet clients.
 String codebase()
          Deprecated. Returns the codebase to be used by applet clients.
 String componentURL()
          Deprecated. Returns a string containing the receiver's component URL.
 NSArray customBundlesClientClasses()
          Deprecated. This method is used in combination with the downloadClientClasses binding.
 NSArray customFrameworksClientClasses()
          Deprecated. This method is used in combination with the downloadClientClasses binding.
 EODistributionContext distributionContext()
          Deprecated. Returns the distribution context used by this component.
 NSArray downloadClientClasses()
          Deprecated. Returns an array of classes to be downloaded to desktop application clients before they start.
 NSArray downloadClientClassURLs()
          Deprecated. Returns an array of URLs to downloaded client classes for desktop application clients.
 Object handleClientRequest()
          Deprecated. Using the receiver's distribution context, generates a response for a client request.
 String interfaceControllerClassName()
          Deprecated. Returns the value of the interfaceControllerClassName binding.
 String language()
          Deprecated. Returns the value of the language binding.
 NSArray mainBundleClientClasses()
          Deprecated. This method is used in combination with the downloadClientClasses binding.
 NSArray noDownloadClientClasses()
          Deprecated. This method is used in combination with the downloadClientClasses binding.
 NSArray otherParameterNames()
          Deprecated. Returns an array containing the names of the non-standard bindings added to the receiver.
 String otherParametersString()
          Deprecated. Returns a string containing the parameter names and values of the non-standard bindings added to the receiver.
 String otherParameterValue()
          Deprecated. Returns the value of the parameter corresponding to the otherParameterName instance variable.
 String pluginCodebase()
          Deprecated. Returns the codebase to be used by applet clients running with Sun's Java Plugin.
 String principalClassNames()
          Deprecated. Returns a string containing all names of client side principal classes, separated by a space character.
 String sessionID()
          Deprecated. Returns a string containing the receiver's session ID.
 boolean shouldOmitApplicationClassName()
          Deprecated. Returns whether the receiver has a applicationClassName binding.
 boolean shouldOmitChannelClassName()
          Deprecated. Returns whether the receiver has a channelClassName binding.
 boolean shouldOmitInterfaceControllerClassName()
          Deprecated. Returns whether the receiver has a interfaceControllerClassName binding.
 boolean shouldOmitLanguage()
          Deprecated. Returns whether the receiver has a language binding.
 boolean shouldOmitSplashIconName()
          Deprecated. Returns whether the receiver has a splashIconName binding.
 boolean shouldOmitSplashIconURL()
          Deprecated. Returns whether the receiver has a splashIconURL binding.
 String splashIconName()
          Deprecated. Returns the value of the splashIconName binding.
 String splashIconURL()
          Deprecated. Returns the value of the splashIconURL binding.
 boolean synchronizesVariablesWithBindings()
          Deprecated. Overridden from the superclass to return false.
 String temporaryGIDBase()
          Deprecated. Returns a value used to generate unique values for temporary global IDs.
 
Methods inherited from class com.webobjects.appserver.WOComponent
appendToResponse, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, invokeAction, isCachingEnabled, isEventLoggingEnabled, isStateless, logString, name, pageWithName, parent, path, performParentAction, pullValuesFromParent, pushValuesToParent, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, sleep, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, template, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForKey, valueForKeyPath
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AllParameterNamesKey

public static final String AllParameterNamesKey
Deprecated. 
The name of the client side parameter containing all parameter names.

ApplicationClassNameKey

public static final String ApplicationClassNameKey
Deprecated. 
The name of the applicationClassName binding.

ApplicationNameKey

public static final String ApplicationNameKey
Deprecated. 
The name of the applicationName binding.

ApplicationURLKey

public static final String ApplicationURLKey
Deprecated. 
The name of the client side parameter containing the application URL.

ArchiveKey

public static final String ArchiveKey
Deprecated. 
The name of the archive binding.

ChannelClassNameKey

public static final String ChannelClassNameKey
Deprecated. 
The name of the channelClassName binding.

CodeKey

public static final String CodeKey
Deprecated. 
The name of the code binding.

CodebaseKey

public static final String CodebaseKey
Deprecated. 
The name of the codebase binding.

ComponentURLKey

public static final String ComponentURLKey
Deprecated. 
The name of the client side parameter containing the component URL of the WOJavaClientApplet.

DidVendComponentURLNotification

public static final String DidVendComponentURLNotification
Deprecated. 
The name of the notification sent when the WOJavaClientApplet determines its component URL.

DistributionContextKey

public static final String DistributionContextKey
Deprecated. 
The name of the distributionContext binding.

DownloadClientClassURLsKey

public static final String DownloadClientClassURLsKey
Deprecated. 
The name of the downloadClientClassURLs binding.

DownloadClientClassesKey

public static final String DownloadClientClassesKey
Deprecated. 
The name of the downloadClientClasses binding.

HeightKey

public static final String HeightKey
Deprecated. 
The name of the height binding.

InterfaceControllerClassNameKey

public static final String InterfaceControllerClassNameKey
Deprecated. 
The name of the interfaceControllerClassName binding.

LanguageKey

public static final String LanguageKey
Deprecated. 
The name of the language binding.

PluginCodebaseKey

public static final String PluginCodebaseKey
Deprecated. 
The name of the pluginCodebase binding.

PrincipalClassNamesKey

public static final String PrincipalClassNamesKey
Deprecated. 
The name of the principalClassNames binding.

SessionIDKey

public static final String SessionIDKey
Deprecated. 
The name of the client side parameter containing the session ID.

SplashIconNameKey

public static final String SplashIconNameKey
Deprecated. 
The name of the splashIconName binding.

SplashIconURLKey

public static final String SplashIconURLKey
Deprecated. 
The name of the splashIconURL binding.

TemporaryGIDBaseKey

public static final String TemporaryGIDBaseKey
Deprecated. 
The name of the temporaryGIDBase binding.

UseJavaPluginKey

public static final String UseJavaPluginKey
Deprecated. 
The name of the useJavaPlugin binding.

WidthKey

public static final String WidthKey
Deprecated. 
The name of the width binding.

otherParameterName

public String otherParameterName
Deprecated. 
A public variable used in a repetition to create a list of all non-standard bindings.
Constructor Detail

WOJavaClientApplet

public WOJavaClientApplet(WOContext context)
Deprecated. 
Creates a new WOJavaClientApplet in a given context.
Parameters:
context - the WebObjects context for the WOJavaClientApplet
Method Detail

allParameterNamesString

public String allParameterNamesString()
Deprecated. 
Returns a string containing all of the receiver's client binding names separated by spaces.
Returns:
a string containing all of the receiver's client binding names

applicationClassName

public String applicationClassName()
Deprecated. 
Returns the value of the applicationClassName binding. If specified, determines the class used for the EOApplication instance on the client side.
Returns:
the value of the applicationClassName binding

applicationName

public String applicationName()
Deprecated. 
Returns the value of the applicationName binding or a default application name if the binding is not specified.
Returns:
the value of the applicationName binding or a default value

applicationURL

public String applicationURL()
Deprecated. 
Returns a string containing the application URL the client uses to communicate with the WOJavaClientApplet.
Returns:
the application URL used by the client

archive

public String archive()
Deprecated. 
Returns the Java archive (.jar file) to be used by applet clients. If the receiver has an archive binding, the value of that binding is returned. Otherwise, the default archive wojavaclient.jar is used.
Returns:
the jar archive for applet clients

channelClassName

public String channelClassName()
Deprecated. 
Returns the value of the channelClassName binding. If specified, determines the class used for the distribution channel on the client side. Otherwise, a standard Java Client HTTP channel is used by the client.
Returns:
the value of the channelClassName binding

clientSideRequestApplicationParameters

public NSDictionary clientSideRequestApplicationParameters()
Deprecated. 
Returns a dictionary with the values of all the client bindings that have been set. This method is used by a desktop Java Client application to get all the arguments. Applets don't need to invoke this method since they have access to all parameters directly in the HTML anyway (through the WOJavaClientApplet).
Returns:
a dictionary with all client bindings

code

public String code()
Deprecated. 
Returns the name of the applet class to be used by applet clients. If the receiver has a code binding, the value of that binding is returned. Otherwise, the default class com.webobjects.eoapplication.EOApplet is used.
Returns:
the name of the applet class for applet clients

codebase

public String codebase()
Deprecated. 
Returns the codebase to be used by applet clients. If the receiver has a codebase binding, the value of that binding is returned. Otherwise, this method returns a URL to look up Java classes from the resource manager appropriate for all types of deployment (web server, direct connect, etc.).
Returns:
the codebase for applet clients

componentURL

public String componentURL()
Deprecated. 
Returns a string containing the receiver's component URL.
Returns:
the component URL

customBundlesClientClasses

public NSArray customBundlesClientClasses()
Deprecated. 
This method is used in combination with the downloadClientClasses binding. Returns an array with the names of all client classes from all custom (not standard WebObjects) bundles (main bundle and frameworks) used by the application.
Returns:
an array with the names of all custom bundles (main bundle and frameworks) client classes
See Also:
downloadClientClasses()

customFrameworksClientClasses

public NSArray customFrameworksClientClasses()
Deprecated. 
This method is used in combination with the downloadClientClasses binding. Returns an array with the names of all client classes from all custom (not standard WebObjects) frameworks used by the application.
Returns:
an array with the names of all custom frameworks client classes
See Also:
downloadClientClasses()

distributionContext

public EODistributionContext distributionContext()
Deprecated. 
Returns the distribution context used by this component. The distribution context is the object that handles all client requests.
Returns:
the distribution context

downloadClientClassURLs

public NSArray downloadClientClassURLs()
Deprecated. 
Returns an array of URLs to downloaded client classes for desktop application clients.
Returns:
the array of download class URLs

downloadClientClasses

public NSArray downloadClientClasses()
Deprecated. 
Returns an array of classes to be downloaded to desktop application clients before they start.
Returns:
the array of download classes for desktop application clients
See Also:
noDownloadClientClasses(), mainBundleClientClasses(), customFrameworksClientClasses(), customBundlesClientClasses()

handleClientRequest

public Object handleClientRequest()
Deprecated. 
Using the receiver's distribution context, generates a response for a client request.
Returns:
the client request return value
See Also:
distributionContext(), EODistributionContext.responseToClientMessage(NSData)

interfaceControllerClassName

public String interfaceControllerClassName()
Deprecated. 
Returns the value of the interfaceControllerClassName binding. If specified, the client automatically instantiates an interface controller of the specified class and displays its user interface while starting up.
Returns:
the value of the interfaceControllerClassName binding

language

public String language()
Deprecated. 
Returns the value of the language binding. If specified, the client automatically uses this language as the preferred language.
Returns:
the value of the language binding

mainBundleClientClasses

public NSArray mainBundleClientClasses()
Deprecated. 
This method is used in combination with the downloadClientClasses binding. Returns an array with the names of all client classes from the main bundle of the application.
Returns:
an array with the names of all main bundle client classes
See Also:
downloadClientClasses()

noDownloadClientClasses

public NSArray noDownloadClientClasses()
Deprecated. 
This method is used in combination with the downloadClientClasses binding. Returns an empty array to indicate that no classes should be downloaded to desktop application clients.
Returns:
an empty array
See Also:
downloadClientClasses()

otherParameterNames

public NSArray otherParameterNames()
Deprecated. 
Returns an array containing the names of the non-standard bindings added to the receiver.
Returns:
an array with the non-standard binding names

otherParameterValue

public String otherParameterValue()
Deprecated. 
Returns the value of the parameter corresponding to the otherParameterName instance variable. This method is used in a repetition to create a list of all non-standard bindings.
Returns:
value of the parameter corresponding to the otherParameterName instance variable

otherParametersString

public String otherParametersString()
Deprecated. 
Returns a string containing the parameter names and values of the non-standard bindings added to the receiver.
Returns:
a string with the non-standard binding names and values

pluginCodebase

public String pluginCodebase()
Deprecated. 
Returns the codebase to be used by applet clients running with Sun's Java Plugin. If the receiver has a pluginCodebase binding, the value of that binding is returned. Otherwise, this method returns a URL to look up Java classes from the resource manager appropriate for all types of deployment (web server, direct connect, etc.).
Returns:
the codebase for applet clients running in Sun's Java Plugin
See Also:
codebase()

principalClassNames

public String principalClassNames()
Deprecated. 
Returns a string containing all names of client side principal classes, separated by a space character.
Returns:
a string specifying all names of client side principal classes

sessionID

public String sessionID()
Deprecated. 
Returns a string containing the receiver's session ID.
Returns:
the session ID

shouldOmitApplicationClassName

public boolean shouldOmitApplicationClassName()
Deprecated. 
Returns whether the receiver has a applicationClassName binding.
Returns:
true if the receiver has a applicationClassName binding; false otherwise
See Also:
applicationClassName()

shouldOmitChannelClassName

public boolean shouldOmitChannelClassName()
Deprecated. 
Returns whether the receiver has a channelClassName binding.
Returns:
true if the receiver has a channelClassName binding; false otherwise
See Also:
channelClassName()

shouldOmitInterfaceControllerClassName

public boolean shouldOmitInterfaceControllerClassName()
Deprecated. 
Returns whether the receiver has a interfaceControllerClassName binding.
Returns:
true if the receiver has a interfaceControllerClassName binding; false otherwise
See Also:
interfaceControllerClassName()

shouldOmitLanguage

public boolean shouldOmitLanguage()
Deprecated. 
Returns whether the receiver has a language binding.
Returns:
true if the receiver has a language binding; false otherwise
See Also:
language()

shouldOmitSplashIconName

public boolean shouldOmitSplashIconName()
Deprecated. 
Returns whether the receiver has a splashIconName binding.
Returns:
true if the receiver has a splashIconName binding; false otherwise
See Also:
splashIconName()

shouldOmitSplashIconURL

public boolean shouldOmitSplashIconURL()
Deprecated. 
Returns whether the receiver has a splashIconURL binding.
Returns:
true if the receiver has a splashIconURL binding; false otherwise
See Also:
splashIconURL()

splashIconName

public String splashIconName()
Deprecated. 
Returns the value of the splashIconName binding. The splash icon is displayed in a window during client startup. You can also specify the splash icon with an URL.
Returns:
the value of the splashIconName binding
See Also:
splashIconURL()

splashIconURL

public String splashIconURL()
Deprecated. 
Returns the value of the splashIconURL binding. The splash icon is displayed in a window during client startup. You can also specify the splash icon with a name.
Returns:
the value of the splashIconURL binding
See Also:
splashIconName()

synchronizesVariablesWithBindings

public boolean synchronizesVariablesWithBindings()
Deprecated. 
Overridden from the superclass to return false.
Overrides:
synchronizesVariablesWithBindings in class WOComponent
Returns:
false

temporaryGIDBase

public String temporaryGIDBase()
Deprecated. 
Returns a value used to generate unique values for temporary global IDs. Do not touch this value.
Returns:
a value you should not modify

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.