com.sun.ws.management.framework.eventing
Interface EventSourceInterface

All Superinterfaces:
Handler

public interface EventSourceInterface
extends Handler

This interface defines the required methods for a EventSource instance. An Event Source must support SUBSCRIBE. How an Event Source and it's associated Subscription Manager communicate crucial information when they are VM different, is currently ambiguously defined by the specifications. Provide implementations for: isAlsoTheSubscriptionManager() getSubscriptionManager()

Author:
Simeon

Method Summary
 void create(HandlerContext context, Management request, Management response)
           
 Management getMetadataForEventSource()
          This is required to indicate how to contact the remote Subscription Manager.
 Management getMetadataForSubscriptionManager()
          This is required to indicate how the remote Subscription Manager is to communicate with the remote EventSource that it is managing subscriptions for.
 boolean isAlsoTheSubscriptionManager()
          Flag indicating whether this EventSource is also the SubscriptionManager instance as well.
 Management subscribe(java.lang.String resource, HandlerContext context, Management request, Management response)
          Fundamental method of an Event Source.
 
Methods inherited from interface com.sun.ws.management.server.Handler
handle
 

Method Detail

subscribe

Management subscribe(java.lang.String resource,
                     HandlerContext context,
                     Management request,
                     Management response)
                     throws javax.xml.bind.JAXBException,
                            javax.xml.soap.SOAPException,
                            javax.xml.datatype.DatatypeConfigurationException,
                            java.io.IOException
Fundamental method of an Event Source. See WS-Eventing for more details about how this should be implemented.

Parameters:
context -
eventRequest -
eventResponse -
Returns:
Throws:
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
javax.xml.datatype.DatatypeConfigurationException
java.io.IOException

create

void create(HandlerContext context,
            Management request,
            Management response)
            throws java.lang.Exception
Throws:
java.lang.Exception

isAlsoTheSubscriptionManager

boolean isAlsoTheSubscriptionManager()
Flag indicating whether this EventSource is also the SubscriptionManager instance as well. No soap message communication with SubscriptionManager instance necessary if the Event Source and Subscription Manager are the same handler.

Returns:
boolean flag indicating the above status.

getMetadataForEventSource

Management getMetadataForEventSource()
                                     throws javax.xml.soap.SOAPException,
                                            javax.xml.bind.JAXBException,
                                            javax.xml.datatype.DatatypeConfigurationException,
                                            java.io.IOException
This is required to indicate how to contact the remote Subscription Manager. The Management instance returned is expected to be a Wiseman Metadata artifact with all required Addressing information already populated.

Returns:
Throws:
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
javax.xml.datatype.DatatypeConfigurationException
java.io.IOException

getMetadataForSubscriptionManager

Management getMetadataForSubscriptionManager()
                                             throws javax.xml.soap.SOAPException,
                                                    javax.xml.bind.JAXBException,
                                                    javax.xml.datatype.DatatypeConfigurationException,
                                                    java.io.IOException
This is required to indicate how the remote Subscription Manager is to communicate with the remote EventSource that it is managing subscriptions for. The Management instance returned is expected to be a Wiseman Metadata artifact with all required Addressing information already populated. Most times the EventSource is already annotated with the information above, so you just need to retrieve the attached annotation and run it through the AnnotationProcessing api. See SampleEventSourceHandler for an example.

Returns:
Throws:
javax.xml.soap.SOAPException
javax.xml.bind.JAXBException
javax.xml.datatype.DatatypeConfigurationException
java.io.IOException