View Javadoc
1   /**
2    * This Source Code Form is subject to the terms of the Mozilla Public
3    * License, v. 2.0. If a copy of the MPL was not distributed with this
4    * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5    *
6    * If it is not possible or desirable to put the notice in a particular
7    * file, then You may include the notice in a location (such as a LICENSE
8    * file in a relevant directory) where a recipient would be likely to look
9    * for such a notice.
10  
11   * 
12   */
13   
14  /*  ---------------------------------------------------------------------------
15   *  U.S. Government, Department of the Army
16   *  Army Materiel Command
17   *  Research Development Engineering Command
18   *  Communications Electronics Research Development and Engineering Center
19   *  ---------------------------------------------------------------------------
20   */
21  
22  package org.miloss.fgsms.wsn.clientcallback;
23  
24  
25  
26  import javax.jws.*;
27  import javax.jws.soap.SOAPBinding;
28  import javax.xml.datatype.DatatypeConfigurationException;
29  import org.oasis_open.docs.wsn.b_2.*;
30  import org.oasis_open.docs.wsn.br_2.*;
31  import org.oasis_open.docs.wsn.brw_2.*;
32  
33  /**
34   *
35   * @author Administrator
36   */
37  @WebService(name = "NotificationBroker", targetNamespace = "http://docs.oasis-open.org/wsn/bw-2")
38  @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
39  public class WSNotifyCallback implements org.oasis_open.docs.wsn.brw_2.NotificationBroker
40  {
41      
42      private IWSNCallBack callbackReference=null;
43      public WSNotifyCallback(IWSNCallBack callbackDelegate) throws DatatypeConfigurationException {
44          callbackReference = callbackDelegate;
45      }
46      
47      
48      /**
49       * 
50       * @param registerPublisherRequest
51       * @return
52       *     returns org.oasis_open.docs.wsn.br_2.RegisterPublisherResponse
53       * @throws PublisherRegistrationFailedFault
54       * @throws InvalidTopicExpressionFault
55       * @throws ResourceUnknownFault
56       * @throws TopicNotSupportedFault
57       * @throws UnacceptableInitialTerminationTimeFault
58       * @throws PublisherRegistrationRejectedFault
59       */
60      @WebMethod(operationName = "RegisterPublisher", action = "RegisterPublisher")
61      @WebResult(name = "RegisterPublisherResponse", targetNamespace = "http://docs.oasis-open.org/wsn/br-2", partName = "RegisterPublisherResponse")
62      public RegisterPublisherResponse registerPublisher(
63          @WebParam(name = "RegisterPublisher", targetNamespace = "http://docs.oasis-open.org/wsn/br-2", partName = "RegisterPublisherRequest")
64          RegisterPublisher registerPublisherRequest)
65          throws InvalidTopicExpressionFault, PublisherRegistrationFailedFault, PublisherRegistrationRejectedFault, ResourceUnknownFault, TopicNotSupportedFault, UnacceptableInitialTerminationTimeFault
66      {
67          throw new UnsupportedOperationException("Not yet implemented");
68      }
69  
70      /**
71       * 
72       * @param subscribeRequest
73       * @return
74       *     returns org.oasis_open.docs.wsn.b_2.SubscribeResponse
75       * @throws ResourceUnknownFault
76       * @throws UnrecognizedPolicyRequestFault
77       * @throws InvalidTopicExpressionFault
78       * @throws InvalidFilterFault
79       * @throws InvalidProducerPropertiesExpressionFault
80       * @throws SubscribeCreationFailedFault
81       * @throws NotifyMessageNotSupportedFault
82       * @throws InvalidMessageContentExpressionFault
83       * @throws TopicExpressionDialectUnknownFault
84       * @throws UnsupportedPolicyRequestFault
85       * @throws TopicNotSupportedFault
86       * @throws UnacceptableInitialTerminationTimeFault
87       */
88      @WebMethod(operationName = "Subscribe", action = "Subscribe")
89      @WebResult(name = "SubscribeResponse", targetNamespace = "http://docs.oasis-open.org/wsn/b-2", partName = "SubscribeResponse")
90      public SubscribeResponse subscribe(
91              @WebParam(name = "Subscribe", targetNamespace = "http://docs.oasis-open.org/wsn/b-2", partName = "SubscribeRequest") Subscribe subscribeRequest)
92              throws InvalidFilterFault, InvalidMessageContentExpressionFault, InvalidProducerPropertiesExpressionFault,
93              InvalidTopicExpressionFault, NotifyMessageNotSupportedFault, ResourceUnknownFault, SubscribeCreationFailedFault,
94              TopicExpressionDialectUnknownFault, TopicNotSupportedFault, UnacceptableInitialTerminationTimeFault,
95              UnrecognizedPolicyRequestFault, UnsupportedPolicyRequestFault {
96                  throw new UnsupportedOperationException("Not yet implemented");
97      }
98  
99      /**
100      * 
101      * @param getCurrentMessageRequest
102      * @return
103      *     returns org.oasis_open.docs.wsn.b_2.GetCurrentMessageResponse
104      * @throws ResourceUnknownFault
105      * @throws InvalidTopicExpressionFault
106      * @throws MultipleTopicsSpecifiedFault
107      * @throws TopicExpressionDialectUnknownFault
108      * @throws TopicNotSupportedFault
109      * @throws NoCurrentMessageOnTopicFault
110      */
111     @WebMethod(operationName = "GetCurrentMessage", action = "GetCurrentMessage")
112     @WebResult(name = "GetCurrentMessageResponse", targetNamespace = "http://docs.oasis-open.org/wsn/b-2", partName = "GetCurrentMessageResponse")
113     public GetCurrentMessageResponse getCurrentMessage(
114             @WebParam(name = "GetCurrentMessage", targetNamespace = "http://docs.oasis-open.org/wsn/b-2", partName = "GetCurrentMessageRequest") GetCurrentMessage getCurrentMessageRequest)
115             throws InvalidTopicExpressionFault, MultipleTopicsSpecifiedFault, NoCurrentMessageOnTopicFault, ResourceUnknownFault, TopicExpressionDialectUnknownFault, TopicNotSupportedFault {
116         throw new SecurityException("operaton not supported");
117     }
118 
119   
120     
121     
122 
123     /**
124      * 
125      * @param notify
126      */
127     @WebMethod(operationName = "Notify", action = "Notify")
128     @Oneway
129     public void notify(
130             @WebParam(name = "Notify", targetNamespace = "http://docs.oasis-open.org/wsn/b-2", partName = "Notify") Notify notify) {
131         //authorize client
132 
133         //inbound notification
134         if (callbackReference != null)
135             callbackReference.OnMessage(notify);
136 
137     }
138 
139     
140     
141     
142     
143     
144     //TODO modify the WSN spec to include,,,,
145     //we really need a GetMySubscriptions if supporting pause, resume and renew
146 
147     
148     
149 
150 
151 }