com.sun.im.desktop
Class MessengerBeanFactory

java.lang.Object
  extended bycom.sun.im.desktop.MessengerBeanFactory

public abstract class MessengerBeanFactory
extends java.lang.Object

implementation of a Sun Messenger extension This is the interface that an extension provider implements in order to be invoked by the messenger application A Messenger extension is invoked through a UI component which may take one several forms, including a button, a pull down or menu option.


Field Summary
static int MBEAN_LOCATION_CHAT
           
static int MBEAN_LOCATION_COMM_TAB_CONFS
           
static int MBEAN_LOCATION_COMM_TAB_CONTACTS
           
static int MBEAN_LOCATION_COMMUNICATOR
           
static int MBEAN_LOCATION_COMPOSE_ALERT
           
static int MBEAN_LOCATION_COMPOSE_POLL
           
static int MBEAN_LOCATION_CONFERENCE
           
static int MBEAN_LOCATION_RECEIVE_ALERT
           
static int MBEAN_LOCATION_RECEIVE_POLL
           
 
Constructor Summary
MessengerBeanFactory()
           
 
Method Summary
 void close()
          perform any required cleanup
 MessengerEventListener getEventListener(MessengerContainer container)
          provides the AWT action listener to be registered with the invoking component.
 int getLocations()
          tell the messenger where the bean should show up Example: If a bean adds functionality to the chat and poll/receive window, this method should return MBEAN_LOCATION_CHAT | MBEAN_LOCATION_RECEIVE_POLL
 MessengerPreferencesPanel getPreferencesPanel()
          get a settings/preferences panel
 void init()
          perform any required initialization
 void removeEventListener(MessengerEventListener listener)
          invoked by the application when the context in which an item listener has been created is being destroyed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MBEAN_LOCATION_CHAT

public static final int MBEAN_LOCATION_CHAT

MBEAN_LOCATION_CONFERENCE

public static final int MBEAN_LOCATION_CONFERENCE

MBEAN_LOCATION_RECEIVE_ALERT

public static final int MBEAN_LOCATION_RECEIVE_ALERT

MBEAN_LOCATION_COMPOSE_ALERT

public static final int MBEAN_LOCATION_COMPOSE_ALERT

MBEAN_LOCATION_RECEIVE_POLL

public static final int MBEAN_LOCATION_RECEIVE_POLL

MBEAN_LOCATION_COMPOSE_POLL

public static final int MBEAN_LOCATION_COMPOSE_POLL

MBEAN_LOCATION_COMMUNICATOR

public static final int MBEAN_LOCATION_COMMUNICATOR

MBEAN_LOCATION_COMM_TAB_CONTACTS

public static final int MBEAN_LOCATION_COMM_TAB_CONTACTS

MBEAN_LOCATION_COMM_TAB_CONFS

public static final int MBEAN_LOCATION_COMM_TAB_CONFS
Constructor Detail

MessengerBeanFactory

public MessengerBeanFactory()
Method Detail

getLocations

public int getLocations()
tell the messenger where the bean should show up Example: If a bean adds functionality to the chat and poll/receive window, this method should return MBEAN_LOCATION_CHAT | MBEAN_LOCATION_RECEIVE_POLL

Returns:
bitwise OR of all locations/windows impacted by this bean

init

public void init()
perform any required initialization


close

public void close()
perform any required cleanup


getEventListener

public MessengerEventListener getEventListener(MessengerContainer container)
provides the AWT action listener to be registered with the invoking component. The specified action listener is invoked when the user activates one of the component used to invoke the extension.

Parameters:
container - container from which the extension was invoked
Returns:
action listener or null if the functionality is disabled.

removeEventListener

public void removeEventListener(MessengerEventListener listener)
invoked by the application when the context in which an item listener has been created is being destroyed. It is important that all references to the listener or the associated context be eliminated in order to avoid memory leaks.

Parameters:
listener - listener to be removed.

getPreferencesPanel

public MessengerPreferencesPanel getPreferencesPanel()
get a settings/preferences panel