@Override
    public void unregister(Connection paramClientOrServer) {
        //TODO - AJ <Done> unregister() [Memory server --> public void unregister(Connection client)]
        logger.log(Level.INFO, "\n\nUnregister -> " + paramClientOrServer.toString());
        ConnectionStub connectionStub = (ConnectionStub) paramClientOrServer;

        CharSequence groupOrServerType = connectionStub.getGroupOrServerType();

        if (groupOrServerType != null) {
            if (INBOUND_SERVERS.containsConnectedServer(connectionStub.getLoginIdOrServerName().toString())) {
                String serverName = connectionStub.getLoginIdOrServerName().toString();
                INBOUND_SERVERS.removeConnectedServer(serverName);
                serverDisconnection(serverName);
                serverName = null;
            } else if (OUTBOUND_SERVERS.containsConnectedServer(connectionStub.getLoginIdOrServerName().toString())) {
                String serverName = connectionStub.getLoginIdOrServerName().toString();
                OUTBOUND_SERVERS.removeConnectedServer(serverName);
                this.isMaster = OUTBOUND_SERVERS.isEmpty();
                serverDisconnection(serverName);
                serverName = null;
            } else {
                Group group = groups.get(groupOrServerType);
                String clientName = connectionStub.getLoginIdOrServerName().toString();
                if (group == null) {
                    logger.log(Level.WARNING, "Could not find group for client {0}", connectionStub);
                    return;
                }
                ConnectedClient extension = group.removeConnectedClient(clientName);

                if (extension != null) {
                    String productName = extension.getProductName().toString();
                    try {
                        executeQuery("call sp_client_disconnection_client_updation__LoginId('" + clientName + "')");
                    } catch (SQLException ex) {
                        Logger.getLogger(UnityIMPServer.class.getName()).log(Level.SEVERE, "SQL exception while unregistering", ex);
                    }
                    ContactListMessage contactListMessage;
                    ServerContactList serverContactList;
                    if (productName == null) {
                        ContactAction action = new ContactAction(ContactAction.Action.REMOVE, clientName);
                        contactListMessage = new ContactListMessage(action);
                        serverContactList = new ServerContactList(groupOrServerType, action);
                        action = null;
                    } else {
                        ContactAction action = new ContactAction(ContactAction.Action.REMOVE, clientName, productName);
                        contactListMessage = new ContactListMessage(action);
                        serverContactList = new ServerContactList(groupOrServerType, action);
                        action = null;
                    }
                    sendToAllConnectedServer(serverContactList);
                    sendToAllConnectedClientInGroup(group.getAllConnectedClient(), contactListMessage);
                    productName = null;
                    contactListMessage = null;
                    serverContactList = null;
                } else {
                    logger.log(Level.WARNING, "Unregister client that was not connected");
                }
                group = null;
                clientName = null;
                extension = null;
            }
        } else {

            logger.log(Level.WARNING, "groupOrServerType of ConnectionStub not set and is null");
        }
        //  throw new UnsupportedOperationException("Not supported yet.");
        connectionStub = null;
        groupOrServerType = null;
    }