*
* @exception ConnectException If the admin connection is closed or broken.
* @exception AdminException If the request fails.
*/
public int getPendingMessages() throws ConnectException, AdminException {
GetPendingMessages request = new GetPendingMessages(agentId);
GetNumberReply reply;
reply = (GetNumberReply) doRequest(request);
return reply.getNumber();
}