|
Carrot2 Framework
API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.core.LocalComponentBase
org.carrot2.core.LocalOutputComponentBase
org.carrot2.core.profiling.ProfiledLocalOutputComponentBase
org.carrot2.webapp.BroadcasterPushOutputComponent
final class BroadcasterPushOutputComponent
An output component for accepting RawDocuments
from the input and broadcasting them to any interested consumers.
| Field Summary | |
|---|---|
static String |
BROADCASTER
|
| Fields inherited from class org.carrot2.core.profiling.ProfiledLocalOutputComponentBase |
|---|
profile |
| Constructor Summary | |
|---|---|
BroadcasterPushOutputComponent()
|
|
| Method Summary | |
|---|---|
void |
addDocument(RawDocument doc)
Accept new document from the input component. |
void |
endProcessing()
Empty default implementation. |
void |
flushResources()
Empty default implementation. |
Set |
getComponentCapabilities()
Provides an implementation that has no capabilities (an empty set). |
String |
getName()
The default implementation returning null. |
Set |
getRequiredPredecessorCapabilities()
Provides an implementation that requires no capabilities of the predecessor component. |
Set |
getRequiredSuccessorCapabilities()
Provides an implementation that requires no capabilities of the successor component. |
Object |
getResult()
|
void |
processingErrorOccurred()
Empty default implementation. |
void |
startProcessing(RequestContext requestContext)
The default implementation checks preconditions and invokes the protected LocalOutputComponentBase.validate() method. |
| Methods inherited from class org.carrot2.core.profiling.ProfiledLocalOutputComponentBase |
|---|
startTimer, stopTimer |
| Methods inherited from class org.carrot2.core.LocalOutputComponentBase |
|---|
validate |
| Methods inherited from class org.carrot2.core.LocalComponentBase |
|---|
getDescription, getIntFromRequestContext, getProperty, init, setProperty, toSet, toSet, toSet |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.carrot2.core.LocalComponent |
|---|
getDescription, init, setProperty |
| Field Detail |
|---|
public static final String BROADCASTER
| Constructor Detail |
|---|
BroadcasterPushOutputComponent()
| Method Detail |
|---|
public void startProcessing(RequestContext requestContext)
throws ProcessingException
LocalOutputComponentBaseLocalOutputComponentBase.validate() method.
startProcessing in interface LocalComponentstartProcessing in class ProfiledLocalOutputComponentBaserequestContext - A RequestContextinterface instance passed
by the container processing the query. The context may be used
to retrieve parameters associated with the query (see RequestContext.getRequestParameters() method).
ProcessingException - Thrown if the component encountered a problem
in processing the query. May also be thrown from a chained
successor component.
public void endProcessing()
throws ProcessingException
LocalOutputComponentBase
endProcessing in interface LocalComponentendProcessing in class LocalOutputComponentBaseProcessingException - Thrown if the component encountered a problem
in processing the query. May also be thrown from a chained
successor component. It is allowed to throw an exception and
not invoke endProcessing() method on
subsequent components. In such case, all components will
receive a LocalComponent.processingErrorOccurred()call.public void processingErrorOccurred()
LocalOutputComponentBase
processingErrorOccurred in interface LocalComponentprocessingErrorOccurred in class LocalOutputComponentBasepublic void flushResources()
LocalOutputComponentBase
flushResources in interface LocalComponentflushResources in class ProfiledLocalOutputComponentBasepublic Set getRequiredSuccessorCapabilities()
LocalComponentBase
getRequiredSuccessorCapabilities in interface LocalComponentgetRequiredSuccessorCapabilities in class LocalComponentBaseSetobject with capabilities. The object
returned may be empty, but should never be null.public Set getRequiredPredecessorCapabilities()
LocalComponentBase
getRequiredPredecessorCapabilities in interface LocalComponentgetRequiredPredecessorCapabilities in class LocalComponentBaseSetobject with capabilities. The object
returned may be empty, but should never be null.public Set getComponentCapabilities()
LocalComponentBase
getComponentCapabilities in interface LocalComponentgetComponentCapabilities in class LocalComponentBaseSetobject with capabilities. The object
returned may be empty, but should never be null.public String getName()
LocalComponentBasenull. In concrete
implementations override this method to provide the appropriate name.
getName in interface LocalComponentgetName in class LocalComponentBasenull namepublic Object getResult()
getResult in interface LocalOutputComponentLocalProcess.query(RequestContext, String) method of LocalProcess interface that initiated query processing.
public void addDocument(RawDocument doc)
throws ProcessingException
addDocument in interface RawDocumentsConsumerdoc - A new RawDocument object passed from the predecessor
component.
ProcessingException - Thrown if this component cannot accept the
document reference for some reason.
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||