void disconnectUsersOfApplication(IEssOlapServer server, String applicationName) throws EssException { // get the connections to the server IEssIterator connections = server.getConnections(); // loop the connections for (int i = 0; i < connections.getCount(); i++) { // cast to a connection info object IEssOlapServer.IEssOlapConnectionInfo connection = (IEssOlapServer.IEssOlapConnectionInfo)connections .getAt(i); // if the connection is to the target app if (connection.getConnectedApplicationName() .equalsIgnoreCase(applicationName)) { // log them off connection.logoffUser(); } } }
How Slow Programs Are Like Christmas: a Sales Pitch
7 months ago
No comments:
Post a Comment