@Override
public void onContentRequest(HttpPlayerSession contentSession)
throws Exception {
String contentId = contentSession.getContentId();
RepositoryItem repositoryItem = contentSession.getRepository()
.findRepositoryItemById(contentId);
if (repositoryItem == null) {
String message = "Repository item " + contentId + " does no exist";
getLogger().warn(message);
contentSession.terminate(404, message);
} else {
RepositoryHttpPlayer player = repositoryItem
.createRepositoryHttpPlayer();
String mediaUrl = contentSession.getHttpServletRequest()
.getScheme()
+ "://"
+ config.getHandlerAddress()