|
WebObjects 5.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.webobjects.appserver.WOElement | +--com.webobjects.appserver.WOComponent | +--com.webobjects.eodistribution.WOJavaClientApplet
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.
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). |
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. |
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
The name of the client side parameter containing all parameter names. |
static String |
ApplicationClassNameKey
The name of the applicationClassName binding. |
static String |
ApplicationURLKey
The name of the client side parameter containing the application URL. |
static String |
ArchiveKey
The name of the archive binding. |
static String |
ChannelClassNameKey
The name of the channelClassName binding. |
static String |
CodebaseKey
The name of the codebase binding. |
static String |
CodeKey
The name of the code binding. |
static String |
ComponentURLKey
The name of the client side parameter containing the component URL of the WOJavaClientApplet. |
static String |
DidVendComponentURLNotification
The name of the notification sent when the WOJavaClientApplet determines its component URL. |
static String |
DistributionContextKey
The name of the distributionContext binding. |
static String |
DownloadClientClassesKey
The name of the downloadClientClasses binding. |
static String |
DownloadClientClassURLsKey
The name of the downloadClientClassURLs binding. |
static String |
HeightKey
The name of the height binding. |
static String |
InterfaceControllerClassNameKey
The name of the interfaceControllerClassName binding. |
static String |
LanguageKey
The name of the language binding. |
String |
otherParameterName
A public variable used in a repetition to create a list of all non-standard bindings. |
static String |
PluginCodebaseKey
The name of the pluginCodebase binding. |
static String |
SessionIDKey
The name of the client side parameter containing the session ID. |
static String |
TemporaryGIDBaseKey
The name of the temporaryGIDBase binding. |
static String |
UseJavaPluginKey
The name of the useJavaPlugin binding. |
static String |
WidthKey
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)
Creates a new WOJavaClientApplet in a given context. |
Method Summary | |
String |
allParameterNamesString()
Returns a string containing all of the receiver's client binding names separated by spaces. |
String |
applicationClassName()
Returns the value of the applicationClassName binding. |
String |
applicationURL()
Returns a string containing the application URL the client uses to communicate with the WOJavaClientApplet. |
String |
archive()
Returns the Java archive ( .jar file) to be used by applet clients. |
String |
channelClassName()
Returns the value of the channelClassName binding. |
NSDictionary |
clientSideRequestApplicationParameters()
Returns a dictionary with the values of all the client bindings that have been set. |
String |
code()
Returns the name of the applet class to be used by applet clients. |
String |
codebase()
Returns the codebase to be used by applet clients. |
String |
componentURL()
Returns a string containing the receiver's component URL. |
NSArray |
customBundlesClientClasses()
This method is used in combination with the downloadClientClasses
binding. |
NSArray |
customFrameworksClientClasses()
This method is used in combination with the downloadClientClasses
binding. |
EODistributionContext |
distributionContext()
Returns the distribution context used by this component. |
NSArray |
downloadClientClasses()
Returns an array of classes to be downloaded to desktop application clients before they start. |
NSArray |
downloadClientClassURLs()
Returns an array of URLs to downloaded client classes for desktop application clients. |
Object |
handleClientRequest()
Using the receiver's distribution context, generates a response for a client request. |
String |
interfaceControllerClassName()
Returns the value of the interfaceControllerClassName binding. |
NSArray |
mainBundleClientClasses()
This method is used in combination with the downloadClientClasses
binding. |
NSArray |
noDownloadClientClasses()
This method is used in combination with the downloadClientClasses
binding. |
NSArray |
otherParameterNames()
Returns an array containing the names of the non-standard bindings added to the receiver. |
String |
otherParametersString()
Returns a string containing the parameter names and values of the non-standard bindings added to the receiver. |
String |
otherParameterValue()
Returns the value of the parameter corresponding to the otherParameterName instance variable. |
String |
pluginCodebase()
Returns the codebase to be used by applet clients running with Sun's Java Plugin. |
String |
sessionID()
Returns a string containing the receiver's session ID. |
boolean |
shouldOmitApplicationClassName()
Returns whether the receiver has a applicationClassName binding. |
boolean |
shouldOmitChannelClassName()
Returns whether the receiver has a channelClassName binding. |
boolean |
shouldOmitInterfaceControllerClassName()
Returns whether the receiver has a interfaceControllerClassName binding. |
boolean |
synchronizesVariablesWithBindings()
Overridden from the superclass to return false . |
String |
temporaryGIDBase()
Returns a value used to generate unique values for temporary global IDs. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String AllParameterNamesKey
public static final String ApplicationClassNameKey
applicationClassName
binding.public static final String ApplicationURLKey
public static final String ArchiveKey
archive
binding.public static final String ChannelClassNameKey
channelClassName
binding.public static final String CodeKey
code
binding.public static final String CodebaseKey
codebase
binding.public static final String ComponentURLKey
public static final String DidVendComponentURLNotification
public static final String DistributionContextKey
distributionContext
binding.public static final String DownloadClientClassURLsKey
downloadClientClassURLs
binding.public static final String DownloadClientClassesKey
downloadClientClasses
binding.public static final String HeightKey
height
binding.public static final String InterfaceControllerClassNameKey
interfaceControllerClassName
binding.public static final String LanguageKey
language
binding.public static final String PluginCodebaseKey
pluginCodebase
binding.public static final String SessionIDKey
public static final String TemporaryGIDBaseKey
temporaryGIDBase
binding.public static final String UseJavaPluginKey
useJavaPlugin
binding.public static final String WidthKey
width
binding.public String otherParameterName
Constructor Detail |
public WOJavaClientApplet(WOContext context)
context
- the WebObjects context for the WOJavaClientAppletMethod Detail |
public String allParameterNamesString()
public String applicationClassName()
applicationClassName
binding.
If specified, determines the class used for the EOApplication instance on the client side.applicationClassName
bindingpublic String applicationURL()
public String 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.public String channelClassName()
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.channelClassName
bindingpublic NSDictionary clientSideRequestApplicationParameters()
public String code()
code
binding, the value of that binding is returned. Otherwise,
the default class com.webobjects.eoapplication.EOApplet
is used.public String codebase()
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.).public String componentURL()
public NSArray customBundlesClientClasses()
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.downloadClientClasses()
public NSArray customFrameworksClientClasses()
downloadClientClasses
binding. Returns an array with the names of all client classes from all custom
(not standard WebObjects) frameworks used by the application.downloadClientClasses()
public EODistributionContext distributionContext()
public NSArray downloadClientClassURLs()
public NSArray downloadClientClasses()
noDownloadClientClasses()
,
mainBundleClientClasses()
,
customFrameworksClientClasses()
,
customBundlesClientClasses()
public Object handleClientRequest()
distributionContext()
,
EODistributionContext.responseToClientMessage(NSData)
public String interfaceControllerClassName()
interfaceControllerClassName
binding.
If specified, the client automatically instantiates an interface controller
of the specified class and displays its user interface while starting up.interfaceControllerClassName
bindingpublic NSArray mainBundleClientClasses()
downloadClientClasses
binding. Returns an array with the names of all client classes from the main
bundle of the application.downloadClientClasses()
public NSArray noDownloadClientClasses()
downloadClientClasses
binding. Returns an empty array to indicate that no classes should be downloaded
to desktop application clients.downloadClientClasses()
public NSArray otherParameterNames()
public String otherParameterValue()
otherParameterName
instance variable. This
method is used in a repetition to create a list of all
non-standard bindings.otherParameterName
instance variablepublic String otherParametersString()
public String pluginCodebase()
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.).codebase()
public String sessionID()
public boolean shouldOmitApplicationClassName()
applicationClassName
binding.true
if the receiver has a applicationClassName
binding;
false
otherwiseapplicationClassName()
public boolean shouldOmitChannelClassName()
channelClassName
binding.true
if the receiver has a channelClassName
binding;
false
otherwisechannelClassName()
public boolean shouldOmitInterfaceControllerClassName()
interfaceControllerClassName
binding.true
if the receiver has a interfaceControllerClassName
binding;
false
otherwiseinterfaceControllerClassName()
public boolean synchronizesVariablesWithBindings()
false
.synchronizesVariablesWithBindings
in class WOComponent
false
public String temporaryGIDBase()
|
Last updated Thu Jan 10 18:10:21 PST 2002. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |