public void clientDisconnected(WonderlandClientSender sender, WonderlandClientID clientID) {
logger.fine("SasProvider client disconnected.");
SasServer server = (SasServer) serverRef.get();
ManagedReference providerRef = server.providerDisconnected(sender, clientID);
if (providerRef != null) {
ProviderMessagesInFlight messagesInFlight = getProviderMessagesInFlight();
if (messagesInFlight != null) {
messagesInFlight.removeMessagesForProvider(providerRef);
}
RunningAppInfo runningApps = getRunningApps();
if (runningApps != null) {
runningApps.removeAppInfosForProvider(providerRef);
}
ProviderProxy provider = (ProviderProxy) providerRef.get();
if (provider != null) {
provider.cleanup();
}
}
}