Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] get Participants in ECF application‏

Hi Fernando,

Fernando Gallego wrote:
Hi, I'm working on an application with ECF. I have a container with an adapter (IChannelContainerAdapter) and wanted to know how to get the number of participants connected at a given time (ie just after connecting a participant).

I tried to IChatRoomInfo and IChatRoomContainer but the result is NullpointerException.

The proper adapter to look for for reporting group membership is org.eclipse.ecf.core.IReliableContainer. Note this adapter has a method getGroupMemberIDs() that reports the IDs of known connected containers (the group membership).

Not all providers implement IReliableContainer, so they can/could return null to:

IReliableContainer reliableContainer = (IReliableContainer) container.getAdapter(IReliableContainer.class);

but in practice since many of the providers also implement ISharedObjectContainer (and ISharedObjectContainer extends IReliableContainer), many of the existing implementers of IChannelContainerAdapter also implement IReliableContainer).

Scott





Back to the top