com.endeca.infront.content.source
Class LiveContentSource
java.lang.Object
com.endeca.infront.content.source.AbstractContentSource
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
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
client
protected final com.endeca.infront.publish.LiveContentClient client
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 contentdefaultSiteRootPath
- The default site root path to use when
attempting to resolve content from a servlet requesthost
- host of the publishing TCP serverport
- port of the publishing TCP serverclientPort
- port of the TCP content clientcontextPath
- 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.
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.