com.endeca.infront.content.source
Class LiveContentSource

java.lang.Object
  extended by com.endeca.infront.content.source.AbstractContentSource
      extended by com.endeca.infront.content.source.LiveContentSource
All Implemented Interfaces:
ContentSource

public class LiveContentSource
extends AbstractContentSource

Retrieves items from the live content.


Field Summary
protected  com.endeca.infront.publish.LiveContentClient client
           
 
Fields inherited from class com.endeca.infront.content.source.AbstractContentSource
defaultSiteRootPath
 
Constructor Summary
LiveContentSource(String appName, String defaultSiteRootPath, String host, int port, int clientPort, String contextPath, String realPath)
          Constructs a new Live Content Source.
 
Method Summary
 void destroy()
          Stops the live content client.
 ContentLocator resolveContent(String pContentUri)
          Returns a ContentLocator which can be used to provide information about the location of the content represented by the given URI or retrieve the actual content.
 void setContentMap(Map<String,ContentLocator> contentMap)
          Sets the content map that will be used to resolve content
 
Methods inherited from class com.endeca.infront.content.source.AbstractContentSource
resolveContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

client

protected final com.endeca.infront.publish.LiveContentClient client
Constructor Detail

LiveContentSource

public LiveContentSource(String appName,
                         String defaultSiteRootPath,
                         String host,
                         int port,
                         int clientPort,
                         String contextPath,
                         String realPath)
Constructs a new Live Content Source.

Parameters:
appName - Name of the application for which to retrieve content
defaultSiteRootPath - The default site root path to use when attempting to resolve content from a servlet request
host - host of the publishing TCP server
port - port of the publishing TCP server
clientPort - port of the TCP content client
contextPath - Additional debug property for identifying the client. The context path is the portion of the request URI that is used to select the context of the request.
realPath - Additional debug property for identifying the client. The real path is where the client is located on the file system, and is useful for locating the client from the PromotionStatus page.
Method Detail

resolveContent

public ContentLocator resolveContent(String pContentUri)
                              throws ContentException
Returns a ContentLocator which can be used to provide information about the location of the content represented by the given URI or retrieve the actual content.

Parameters:
pContentUri - The URI to be resolved. The string should be properly URL-encoded.
Returns:
The ContentLocator. Returns NULL if content does not exist for the specified path.
Throws:
ContentException - Thrown when there is an error accessing or forming content.

setContentMap

public void setContentMap(Map<String,ContentLocator> contentMap)
Sets the content map that will be used to resolve content

Parameters:
contentMap - The Map to search for content.

destroy

public void destroy()
Stops the live content client.

Specified by:
destroy in interface ContentSource
Overrides:
destroy in class AbstractContentSource


Copyright © 2012. All Rights Reserved.