|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsystemic.sif.sifcommon.BaseInfo
systemic.sif.sifcommon.publisher.BasePublisher
public abstract class BasePublisher
All publishers should extend this class. It ensures that resources are dealt with correctly.
Constructor Summary | |
---|---|
BasePublisher(java.lang.String publisherID)
This class is a basic initialiser of a publisher. |
Method Summary | |
---|---|
void |
broadcastEvents()
This method retrieves all events to be published by calling the abstract method getSIFEvents(). |
abstract void |
finalise()
This method should release all resources associated with the given publisher. |
java.util.List<SIFEvent> |
getEventsFromFile()
|
java.util.List<openadk.library.SIFDataObject> |
getObjectsFromFile()
|
openadk.library.PublishingOptions |
getOptions()
|
abstract SIFResponseIterator |
getRequestedSIFObjects(openadk.library.Query query,
openadk.library.Zone zone)
This method must returns a SIFResponseIterator. |
abstract SIFEventIterator |
getSIFEvents()
This method returns a SIFEventIterator. |
java.lang.String |
loadXMLFileData(java.lang.String fullPathAndName)
|
void |
onRequest(openadk.library.DataObjectOutputStream dataobjectoutputstream,
openadk.library.Query query,
openadk.library.Zone zone,
openadk.library.MessageInfo msgInfo)
This is the implementation of the SIFWorks ADK method. |
void |
run()
This method is all that is needed to run the publisher in its own thread. |
void |
setOptions(openadk.library.PublishingOptions options)
|
void |
shutdownPublisher()
This method shuts down this publisher gracefully. |
Methods inherited from class systemic.sif.sifcommon.BaseInfo |
---|
getAgentConfig, getAgentID, getAgentProperties, getAgentProperty, getApplicationID, getDtd, getFrameworkProperties, getId, getMappings, getZoneByID, getZones, isValidZone, setAgentConfig, setAgentID, setAgentProperties, setApplicationID, setDtd, setFrameworkProperties, setId, setMappings, setZones |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasePublisher(java.lang.String publisherID)
publisherID
- The unique ID of this publisher. Ideally this is the class name but this is not
necessary. This ID is used throughout the SIFCommon Framework classes to access
properties in the SIFAgent.properties file. This ID must match the reference
in this property file for the given publisher.Method Detail |
---|
public abstract SIFEventIterator getSIFEvents() throws openadk.library.ADKException
openadk.library.ADKException
- If there is an error with retrieving data.public abstract SIFResponseIterator getRequestedSIFObjects(openadk.library.Query query, openadk.library.Zone zone) throws openadk.library.ADKException, openadk.library.SIFException
query
- The query this agent is requested to meet.zone
- The Zone that for which the request has been received.
openadk.library.ADKException
- If there is an error with retrieving data.
openadk.library.SIFException
- If the query cannot be dealt with (ie not supported). In this case the
following fields must be set:public abstract void finalise()
public openadk.library.PublishingOptions getOptions()
public void setOptions(openadk.library.PublishingOptions options)
public final void run()
run
in interface java.lang.Runnable
public final void onRequest(openadk.library.DataObjectOutputStream dataobjectoutputstream, openadk.library.Query query, openadk.library.Zone zone, openadk.library.MessageInfo msgInfo) throws openadk.library.ADKException
onRequest
in interface openadk.library.Publisher
openadk.library.ADKException
getRequestedSIFObjects(openadk.library.Query, openadk.library.Zone)
public void broadcastEvents()
getSIFEvents()
public final void shutdownPublisher()
public java.lang.String loadXMLFileData(java.lang.String fullPathAndName)
public java.util.List<openadk.library.SIFDataObject> getObjectsFromFile()
public java.util.List<SIFEvent> getEventsFromFile()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |