|
SienaXML (v.2.0.0) API documentation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsiena.xml.XMLSubscriptionHandler
public class XMLSubscriptionHandler
This class handles the processing of an XPath statement and runging it into a set of filters that can be used as a subscription to a XML notification. This class also makes sure that any XML notification that is recieved from a server does match the XPath that was used to generate the subscription.
Nested Class Summary | |
---|---|
static class |
XMLSubscriptionHandler.TEST
White box testing class for XMLSubscriptionHandler |
Constructor Summary | |
---|---|
XMLSubscriptionHandler(Notifiable notifiable)
This is the constructor for this object. |
Method Summary | |
---|---|
void |
attach(Observer observer)
Attach an observer to this object |
Filter[] |
buildFilter(java.lang.String subscription)
This method processes the XPath expression passed in and returns a SIENA filter that will correctly subscribe to the events that are generated from an XML Notification based on the XSchema given to this object. |
void |
detach(Observer observer)
Remove an observer from the list of observers. |
Notifiable |
getNotifiable()
Returns the notifiable object |
java.lang.String |
getNotification()
Returns the XML notification received from the SIEAN servers. |
void |
inform()
Used to inform observers of a XML notification that was recieved from the SEINA servers. |
void |
notify(Notification notification)
This function is used to notify this object of an SIEAN notification that matches the SIENA subscriptions generated by this command. |
java.util.Enumeration |
observers()
Return a enumeration of observers for this object |
void |
setStylesheet(java.lang.String filename)
This sets the style sheet for the handler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLSubscriptionHandler(Notifiable notifiable) throws java.io.IOException
notifiable
- The object to be notified when an XML notification is
returned by the SIENA servers.
IOException
- If there is a problem in opening the default rules
file this exception is thrown.Method Detail |
---|
public void notify(Notification notification) throws SienaException
notification
- The notification that was returned by the
SIENA servers.
SienaException
- If there is a problem extracting the XML
notification from the SIENA notification
this exception is thrown.public void attach(Observer observer)
attach
in interface Subject
observer
- The object to include in the list of observing objects.public void detach(Observer observer)
detach
in interface Subject
observer
- The object/observer to remove from the list.public void inform()
inform
in interface Subject
public java.util.Enumeration observers()
public java.lang.String getNotification()
public Notifiable getNotifiable()
public Filter[] buildFilter(java.lang.String subscription) throws siena.SienaException
subscription
- The subscription, or XPath, statement to be converted
into filters.
SienaException
- If no filters can be created this exception is thrown.public void setStylesheet(java.lang.String filename) throws siena.SienaException
filename
- Name of the file containing the XSchema
SienaException
- If there is a problem opening or parsing the file
this exception is thrown.
|
SienaXML (v.2.0.0) API documentation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |