private EventBundle[] poll(String uri, String subscriptionId, long timeout, SessionInfoImpl sessionInfo) throws RepositoryException {
PollMethod method = null;
try {
method = new PollMethod(uri, subscriptionId, timeout);
getClient(sessionInfo).executeMethod(method);
method.checkSuccess();
EventDiscovery disc = method.getResponseAsEventDiscovery();
EventBundle[] events;
if (disc.isEmpty()) {
events = new EventBundle[0];