10.07.2015 Views

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Note: Even though in the panel discussion application we only create onePlace, the server application does have the ability to service requests for theactivity from any number of Places. The server application needs to serve as atype of request dispatcher. Therefore, it is a good practice to instantiate a newclass for each activity request.The ActivityHandler class is responsible for listening for incoming text messages,translating them, and then distributing them to the different sections. It alsohandles some program control related data message.Figure 8-6 depicts the process of accepting the activity request.RedPanelDiscussionSAActivityServiceListenerActivityHandleractivityRequested(ActivityServiceEvent)acceptActivity(MyActivity,byte[])new ActivityHandler(Place,MyActivity)Figure 8-6 Accepting the custom activity request8.5.4 Monitoring the PlaceWhen the ActivityHandler object is created, it in turn instantiates a PlaceMonitorclass. The PlaceMonitor class manages the different sections within the Place. Itlistens for new sections being added to the Place. As each section is added, ituses an alogorithm to determine which section is the stage, which section is theLobby, and which section is the Queue. The stage section is a special section inthe eyes of the Sametime Places model. The stage section can be determinedby using the isStage() method. The Lobby section is determined by finding thenon-stage section with the lowest Member ID. By default, all users entering aPlace will enter in this section unless a flag was set programmatically to enter thestage. The Queue section is defined as the section with the lowest Member IDthat is not the stage section and not the Lobby section. Example 8-1 on page 196shows the algorithm we used.Chapter 8. Places and Place awareness 209

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!