Exemplo n.º 1
0
 public Collection<Client> getClients() {
   final HashSet<Client> clients = new HashSet<Client>();
   for (ClientEndpoint endpoint : endpointManager.getEndpoints()) {
     clients.add((Client) endpoint);
   }
   return clients;
 }
Exemplo n.º 2
0
 @Override
 public void shutdown(boolean terminate) {
   for (ClientEndpoint ce : endpointManager.getEndpoints()) {
     ClientEndpointImpl endpoint = (ClientEndpointImpl) ce;
     try {
       endpoint.destroy();
     } catch (LoginException e) {
       logger.finest(e.getMessage());
     }
     try {
       final Connection conn = endpoint.getConnection();
       if (conn.isAlive()) {
         conn.close("Shutdown of ClientEngine", null);
       }
     } catch (Exception e) {
       logger.finest(e);
     }
   }
   endpointManager.clear();
   ownershipMappings.clear();
 }
Exemplo n.º 3
0
 @Override
 public int getClientEndpointCount() {
   return endpointManager.size();
 }