String[] parts = path.split("/", 2);
String key = parts[0];
- getSession().lock();
+ VaadinSession session = getSession();
+ session.lock();
try {
ConnectorResource resource = (ConnectorResource) getResource(key);
if (resource == null) {
}
stream = resource.getStream();
} finally {
- getSession().unlock();
+ session.unlock();
}
stream.writeResponse(request, response);
return true;
// Ignore if it isn't for us
return false;
}
- getSession().lock();
+ VaadinSession session = getSession();
+
+ session.lock();
DownloadStream stream;
try {
stream.setContentType("application/octet-stream;charset=UTF-8");
}
} finally {
- getSession().unlock();
+ session.unlock();
}
stream.writeResponse(request, response);
return true;
import com.vaadin.server.ResourceReference;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinResponse;
+import com.vaadin.server.VaadinSession;
import com.vaadin.shared.communication.URLReference;
import com.vaadin.shared.ui.AbstractMediaState;
import com.vaadin.shared.ui.MediaControl;
DownloadStream stream;
- getSession().lock();
+ VaadinSession session = getSession();
+ session.lock();
try {
List<URLReference> sources = getState().sources;
.getResource(reference);
stream = resource.getStream();
} finally {
- getSession().unlock();
+ session.unlock();
}
stream.writeResponse(request, response);