Class jive.erlang.EApplet
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jive.erlang.EApplet

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----jive.erlang.EApplet

public class EApplet
extends Applet
EApplet provides an applet stub that automatically connects to an Erlang Jive server.

The class also provides access to some important Jive classes.

All classes subclassing EApplet must first call super.init() in their init method. This will initializ the Jive client.

class Example extends EApplet {
    public void init() {
       super.init();
    }
} 

The HTML code must also contain a PARAM tag specifying which port to use on the server.


Author:
Kaj Nygren (kaj@medialab.ericsson.se), Joakim Grebenö (jocke@erix.ericsson.se)
See Also:
EApplication

Constructor Index

 o EApplet()

Method Index

 o connect()
This method connect the Applet to the Erlang Jive server.
 o connected()
This method checks whether the Applet is connected to the Erlang Jive server or not.
 o disconnect()
This method disconnect the Applet from the Erlang Jive server.
 o getESock()
Returns the ESock object used for socket communication with the Erlang Jive server.
 o init()
This method will initialize the Jive client.
 o receiver()
Returns the EReceiver object used for registering objects which should be called from Erlang.
 o self()
Returns the EProcess representing the client's peer Erlang process.
 o start()
This method will be called everytime the Applet is started.
 o stop()
This method will be called everytime the Applet is stopped.

Constructors

 o EApplet
  public EApplet()

Methods

 o init
  public void init()
This method will initialize the Jive client. It must be called by the subclassing Applet's init method.
Overrides:
init in class Applet
 o start
  public void start()
This method will be called everytime the Applet is started. It will try to connect the Applet to the Erlang Jive server.
Overrides:
start in class Applet
 o stop
  public void stop()
This method will be called everytime the Applet is stopped. It will try to disconnect the Applet from the server.
Overrides:
stop in class Applet
 o connect
  public void connect() throws JiveIOException
This method connect the Applet to the Erlang Jive server. If a connection is already in place nothing happens. If a connection cannot be established a JiveIOException is thrown
Throws: JiveIOException
If a connection error occurred or if the receiver was uninitialized.
 o disconnect
  public void disconnect()
This method disconnect the Applet from the Erlang Jive server. If the Applet already is disconnected nothing happens.
 o connected
  public boolean connected()
This method checks whether the Applet is connected to the Erlang Jive server or not.
 o getESock
  public ESock getESock()
Returns the ESock object used for socket communication with the Erlang Jive server.
 o receiver
  public EReceiver receiver()
Returns the EReceiver object used for registering objects which should be called from Erlang.
 o self
  public EProcess self() throws JiveIOException
Returns the EProcess representing the client's peer Erlang process. The peer Erlang process mimics the client in the Erlang system and forward all messages sent to it (and vice versa).

The self process should be supplied to all Erlang processes wanting to send information back to the client.

Throws: JiveIOException
If the client isn't connected.

All Packages  Class Hierarchy  This Package  Previous  Next  Index