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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

RedPanelDiscussionSAPlacesAdminHandlerPlaceAdminServiceserviceAvailable(PlacesAdminEvent)setDefaultSection(int,int,int)defaultSectionsSet(PlacesAdminEvent)setDefaultActivity(int,int,byte[])defaultActivitySet(PlacesAdminEvent)createPersistentPlace(String,String,int,String,EncLevel)placeCreated(PlacesAdminEvent)Figure 8-5 Creating persistent Place and characteristics sequence diagramThis leads up to our next section on responding to a request for the activity.8.5.3 Responding to a request for the activityBecause we set the default activity for the Place to be our custom activity, theactivityRequested() event will be fired after the Panel Discussion Place has beencreated. When we receive this event, we check to ensure that the Placerequesting the activity was created with our Place type. If so, we accept theactivity and instantiate a new ActivityHandler class. The following is the code weused for handling the request for the activity:public void activityRequested(ActivityServiceEvent event) {MyActivity myActivity = event.getMyActivity();if (myActivity.getPlace().getType() ==RedPanelDiscussionConstants.PLACE_TYPE){m_activityService.acceptActivity(myActivity, null);new ActivityHandler(event.getPlace(), myActivity);} else {m_activityService.declineActivity(myActivity, 0);}}208 <strong>Lotus</strong> <strong>Instant</strong> <strong>Messaging</strong>/<strong>Web</strong> <strong>Conferencing</strong> (Sametime): Building Sametime-Enabled Applications

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

Saved successfully!

Ooh no, something went wrong!