Thursday, 1 August 2013

Impotant Basics Related To Applets

Basic Applets Theory : Applets are two types of varieties and they important role in the java and it contain the basic class nothing but Applet class which provides foundation for applets.The applet class contained in the java.applet package.Later java.applet also defines three interfaces.                
Following Interfaces:
  • AppletContext
  • AudioClip
  • AppletStub                                                                                                                                                                                                                                                                                                                              Now let us discuss about the applets already we noticed there are two types and we will discuss them below
  1. AWT(Abstract window toolkit): It is used to provide the graphical user interface i.e(GUI) and this type of applet has been available since java was first created.
  2. Swing class JApplet: Swing applets use the Swing classs to provide the GUI.Swing offers a richer and often easier-to-use user interface than does the AWT.
  3. JApplet inherits Applet,all the features of applet are also available in JApplet,and most of the information applies to both the applets.
  4.  
  5. Under the EJB 3.0 API, the business interface of an enterprise bean is a plain Java interface, not an
  6. EJBObject or EJBLocalObject interface. [2]
  7. Session beans and message-driven beans require a business interface. The business interface of a message-driven bean is typically defined by the messaging type used (e.g., javax.jms.MessageListener in the case of JMS). Business interfaces in the sense of this chapter are not defined for entity
  8. beans.
  9. The bean class may implement its business interface(s).[3] A bean class may have more than one business interface. The following rules apply:
  10.  If bean class implements a single interface, that interface is assumed to be the business interface of the bean. This business interface will be a local interface unless the interface is designated as a remote business interface by use of the Remote annotation on the bean class or
  11. interface or by means of the deployment descriptor.
  12.  A bean class is permitted to have more than one interface. If a bean class has more than one
  13. interface—excluding the interfaces listed below—any business interface of the bean class must
  14. be explicitly designated as a business interface of the bean by means of the Local or Remote
  15. annotation on the bean class or interface or by means of the deployment descriptor.
  16. The following interfaces are excluded when determining whether the bean class has more than
  17. one interface: java.io.Serializable; java.io.Externalizable; any of the
  18. interfaces defined by the javax.ejb package.
  19.  The same business interface cannot be both a local and a remote business interface of the
  20. bean.[4]
  21. [2] Usage of the earlier EJBObject and EJBLocalObject interface types continues to be supported under EJB 3.0.
  22. The same InvocationContext instance is passed to each interceptor method for a given business
  23. method interception or lifecycle event. This allows an interceptor to save information in the context data
  24. property of the InvocationContext that can be subsequently retrieved in other interceptors as a
  25. means to pass contextual data between interceptors. The contextual data is not shareable across business
  26. method invocations or lifecycle event callbacks. If interceptors are invoked as a result of the invocation
  27. on a web service endpoint, the map returned by getContextData will be the JAX-WS MessageContext [13]. The lifecycle of the InvocationContext instance is otherwise unspecified.
  28. The getTarget method returns the bean instance that is the target of the invocation. The getMethod method returns the method of the bean class for which the interceptor was invoked. For
  29. AroundInvoke methods, this is the business method on the bean class; for lifecycle callback interceptor methods, getMethod returns null. The getParameters method returns the parameters of
  30. the business method invocation. If setParameters has been called, getParameters returns the
  31. values to which the parameters have been set. The setParameters method modifies the parameters
  32. used for the business method invocation. Modifying the parameter values does not affect the determination of the business method that is invoked on the bean class. The parameter types must match the types
  33. for the business method, or the IllegalArgumentException is thrown.
  34. The proceed method causes the invocation of the next interceptor method in the chain, or, when
  35. called from the last AroundInvoke interceptor method, the business method. The proceed method
  36. returns the result of that method invocation. If the business method returns void, proceed returns
  37. null. For lifecycle callback interceptor methods, if there is no callback method defined on the bean
  38. class, the invocation of proceed in the last interceptor method in the chain is a no-op, and null is

No comments:

Post a Comment