Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * JBoss, Home of Professional Open Source
   * Copyright 2011, Red Hat, Inc. and individual contributors
   * by the @authors tag. See the copyright.txt in the distribution for a
   * full listing of individual contributors.
   *
   * This is free software; you can redistribute it and/or modify it
   * under the terms of the GNU Lesser General Public License as
   * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
 
 package net.java.slee.resource.diameter.sh.client;
 
 
Activity used by a Diameter Sh client to represent a subscription to changes in user data in an HSS. Push-Notification-Request messages are fired on this activity as events of type org.jainslee.resources.diameter.sh.SubscribedPushNotificationRequest and Subscribe-Notifications-Answer messages are fired as events of type org.jainslee.resources.diameter.sh.SubscribeNotificationsAnswer. This activity is created by a call to ShClientProvider.createShClientSubscriptionActivity().

Author(s):
Alexandre Mendonca
Bartosz Baranowski
 
 public interface ShClientSubscriptionActivity extends DiameterActivity {

  
Get a message factory to manually create Sh Client Messages.

Returns:
 
Get avp factory.

Returns:
 
Send a Subscribe-Notifications-Request message.

Parameters:
request request message to send
Throws:
java.io.IOException if the message could not be sent
 
Send a Subscribe-Notifications-Request message containing the AVPs required to UNSUBSCRIBE from the user that this activity represents a subscription to.

Throws:
java.io.IOException if the request message could not be sent
 
   void sendUnsubscribeRequest() throws IOException;

  
Creates PNA for receive PNR. It returns null if there is not PNR received.

Returns:
 
Send a manually-constructed PushNotificationAnswer to the peer that sent the PushNotificationRequest.

Parameters:
answer the message to be sent
Throws:
java.io.IOException if the message could not be sent
 
Convenience method to create and send a PushNotificationAnswer containing a Result-Code or Experimental-Result AVP populated with the given value.

Parameters:
resultCode
isExperimentalResultCode
Throws:
java.io.IOException if the message could not be sent
 
   void sendPushNotificationAnswer(long resultCode,boolean isExperimentalResultCodethrows IOException;

  
Creates PNA for receive PNR. It returns null if there is not PNR received.

Parameters:
resultCode - result code to be added
isExperimaental - true if result code is experimental result code
Returns:
 
  PushNotificationAnswer createPushNotificationAnswer(long resultCodeboolean isExperimaental);

  
Return the User-Identity for the subscription in the HSS represented by this activity.

Returns:
the User-Identity AVP sent in the initial Subscription-Notifications-Request passed to sendSubscribeNotificationsRequest(net.java.slee.resource.diameter.sh.server.events.SubscribeNotificationsRequest).
New to GrepCode? Check out our FAQ X