Package org.apache.ws.notification

Examples of org.apache.ws.notification.NotificationManager


    */
   public SOAPElement[] getCurrentMessage( TopicDocument topicExpressionType )
   throws BaseFaultException,
          Exception
   { //todo update generated code to use TopicDocument
      NotificationManager notificationManager = getNotificationManager(  );

      if ( notificationManager != null )
      {
         return notificationManager.getCurrentMessage( topicExpressionType );
      }

      return null;
   }
View Full Code Here


    */
   public EndpointReferenceType subscribe( SubscriptionRequest subscribeRequest )
   throws BaseFaultException,
          Exception
   {
      NotificationManager notificationManager = getNotificationManager(  );

      if ( notificationManager != null )
      {
         return notificationManager.subscribe( subscribeRequest );
      }

      return null;
   }
View Full Code Here

   /**
    * @see AbstractWSResource#emitTerminationNotification()
    */
   protected void emitTerminationNotification(  )
   {
      NotificationManager notifMgr = getNotificationManager(  );

      if ( notifMgr != null )
      {
         TopicDocument topicDoc = TopicDocument.Factory.newInstance(  );
         XmlBeansUtils.setupTopicExpressionType( ResourceLifetime11Constants.NSURI_WSRL,
                                                 ResourceLifetime11Constants.TOPIC_QNAME_RESOURCE_TERMINATION
                                                 .getLocalPart(  ),
                                                 topicDoc.addNewTopic(  ) );

         TerminationNotificationDocument termNotifDoc = TerminationNotificationDocument.Factory.newInstance(  );
         TerminationNotification         termNotif = termNotifDoc.addNewTerminationNotification(  );
         termNotif.setTerminationTime( Calendar.getInstance(  ) );

         try
         {
            notifMgr.emit( topicDoc,
                           XmlBeansUtils.toSOAPElement( termNotifDoc ) );
         }
         catch ( Exception e )
         {
            // TODO: what to do if we fail to emit this notification?
View Full Code Here

TOP

Related Classes of org.apache.ws.notification.NotificationManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.