public RemoteChatContext getServerChatContext(ChatListener chatListener)
throws RemoteException, IllegalActionException {
XmlRemoteServerChatContext context = new XmlRemoteServerChatContext(performer,generator);
if(serverChatContext.compareAndSet(null, context)){
serverListenerTree.setServerChatListener(chatListener);
performer.perform(new ServerChatInterestAction(generator.getNextID()));
return context;
}else{
throw new IllegalActionException("Already registered a server chat listener");
}
}