agent.interaction.samples.outbound
Class CampaignAdapter

java.lang.Object
  extended by agent.interaction.samples.outbound.CampaignAdapter

public class CampaignAdapter
extends java.lang.Object

Handles campaign actions and events for the place of the example.
In this example, the gui shows the list of campaigns active on the place. The user can select of them to see its status and description.


Field Summary
 com.genesyslab.ail.Dn sampleDn
          Dn object used in this example.
 com.genesyslab.ail.Place samplePlace
          Place object used in this example.
 
Constructor Summary
CampaignAdapter(com.genesyslab.ail.Place _samplePlace, com.genesyslab.ail.Dn _sampleDn, com.genesyslab.ail.OutboundService _outboundService, agent.interaction.samples.outbound.AgentOutboundGui _gui)
          Constructor.
 
Method Summary
 void handleCampaignEvent(com.genesyslab.ail.event.CampaignEvent event)
          Receives CampaignEvents, which report changes to the data of a campaign.
 void setCampaignWidgetState()
          Enables/Disables widgets according to the data of the selected campaign.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

samplePlace

public com.genesyslab.ail.Place samplePlace
Place object used in this example.


sampleDn

public com.genesyslab.ail.Dn sampleDn
Dn object used in this example.

Constructor Detail

CampaignAdapter

public CampaignAdapter(com.genesyslab.ail.Place _samplePlace,
                       com.genesyslab.ail.Dn _sampleDn,
                       com.genesyslab.ail.OutboundService _outboundService,
                       agent.interaction.samples.outbound.AgentOutboundGui _gui)
Constructor. At creation, the instance links widgets (campaign buttons and box) to campaign actions.

Method Detail

setCampaignWidgetState

public void setCampaignWidgetState()
Enables/Disables widgets according to the data of the selected campaign.


handleCampaignEvent

public void handleCampaignEvent(com.genesyslab.ail.event.CampaignEvent event)
Receives CampaignEvents, which report changes to the data of a campaign. Because this method is called in the PlaceListener, it creates a thread to manage the event without delaying the publication of further incoming events.