Interface | Description |
---|---|
IInstantMessenger |
IInstantMessenger defines the interface for an instant messenger implementation to hook into the ERIMAdaptor
framework.
|
IInstantMessengerFactory |
InstantMessengerFactory is the factory interface that InstantMessengerAdaptor uses to create instances of an
InstantMessenger.
|
IMessageListener |
Class | Description |
---|---|
AbstractInstantMessenger | |
AimBotInstantMessenger | |
AimBotInstantMessenger.Factory | |
Conversation |
Represents an open instant messenger conversation.
|
DaimInstantMessenger | |
DaimInstantMessenger.Factory | |
IMConnectionTester | |
InstantMessengerAdaptor | |
InstantMessengerConnection | |
InstantMessengerConnection.Message | |
InstantMessengerWatchDog | |
JOscarInstantMessenger | |
JOscarInstantMessenger.Factory | |
JOscarLogManager | |
JOscarLogManager.Log4JLogger |
Exception | Description |
---|---|
BuddyOfflineException | |
ConnectedTooFastException | |
IMConnectionException | |
InstantMessengerException | |
MessageException |
ERIMAdaptor provides an Instant Messenger interface to your WOComponents. There are several limitations that, however, you need to be aware of. Only one IMAction per-page can be triggered (the last one that is visible to the user, specifically).
The architecture of this adaptor is someone different than the normal HTTP adaptor, because of inherent limitations in the IM interfaces like AOL IM:
ERIMAdaptor is a custom adaptor, so it can be added using the WOAdditionalAdaptors option on your WO:
-WOAdditionalAdaptors ({WOAdaptor="er.imadaptor.InstantMessengerAdaptor";})
There are several new settings that can (or must) appear in your Properties file as well:
In your code, the following request headers are available:
The following form values are available in the request:
For each request, the IM Adaptor needs to know what action to call when the subsequent request comes in. In a normal WOComponent, think of this as each page having a "Next" button on it that is clicked each time a request comes in. Instead of using a WOSubmitButton or a WOHyperlink, you instead use the IMAction element. This element has one attribute -- "action" that points to the action method to call on your component. So for instance:
public class IMComponent extends WOComponent { public boolean userResponded; ... public String buddyName() { return InstantMessengerAdaptor.buddyName(context().request()); } public WOActionResults processResponse() { userResponded = true; return null; } }
<webobject name = "FirstContactConditional"> Hi <webobject name = "BuddyName"></webobject>! </webobject> <webobject name = "UserRespondedConditional"> Welcome back <webobject name = "BuddyName"></webobject>! </webobject> <webobject name = "IMAction"></webobject>
FirstContactConditional : WOConditional { condition = userResponded; negate = true; } UserRespondedConditional : WOConditional { condition = userResponded; } BuddyName : WOString { value = buddyName; } IMAction : IMAction { action = processResponse; }
Mike> Hey server! Server> Hi Mike! Mike> How's it going? Server> Welcome back Mike! Mike> Uh. OK. Server> Welcome back Mike! ...
Copyright © 2002 – 2024 Project Wonder.