All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.java.slee.resource.diameter.sh.events.PushNotificationAnswer Maven / Gradle / Ivy

The newest version!
/*
 * 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.events;

import net.java.slee.resource.diameter.base.events.avp.ExperimentalResultAvp;
import net.java.slee.resource.diameter.base.events.avp.FailedAvp;

/**
 * Defines an interface representing the Push-Notification-Answer command.
 * 
 * From the Diameter Sh Reference Point Protocol Details (3GPP TS 29.329 V9.2.0)
 * specification:
 * 
 * 
 * 6.1.8        Push-Notification-Answer (PNA) Command
 * 
 * The Push-Notifications-Answer (PNA) command, indicated by the Command-Code
 * field set to 309 and the 'R' bit cleared in the Command Flags field, is sent by
 * a client in response to the Push-Notification-Request command. The
 * Experimental-Result AVP may contain one of the values defined in section 6.2 or
 * in 3GPP TS 29.229 [6].
 * 
 * Message Format
 * < Push-Notification-Answer > ::=< Diameter Header: 309, PXY, 16777217 >
 *                                 < Session-Id >
 *                                 { Vendor-Specific-Application-Id }
 *                                 [ Result-Code ]
 *                                 [ Experimental-Result ]
 *                                 { Auth-Session-State }
 *                                 { Origin-Host }
 *                                 { Origin-Realm }
 *                                *[ Supported-Features ]
 *                                *[ AVP ]
 *                                *[ Failed-AVP ]
 *                                *[ Proxy-Info ]
 *                                *[ Route-Record ]
 * 
* * @author Alexandre Mendonca * @author Bartosz Baranowski */ public interface PushNotificationAnswer extends DiameterShMessage { static final int commandCode = 309; /** * Returns true if the Result-Code AVP is present in the message. */ boolean hasResultCode(); /** * Returns the value of the Result-Code AVP, of type Unsigned32. Use * {@link #hasResultCode()} to check the existence of this AVP. * * @return the value of the Result-Code AVP * @throws IllegalStateException * if the Result-Code AVP has not been set on this message */ long getResultCode(); /** * Sets the value of the Result-Code AVP, of type Unsigned32. * * @throws IllegalStateException * if setResultCode has already been called */ void setResultCode(long resultCode); /** * Returns true if the Experimental-Result AVP is present in the message. */ boolean hasExperimentalResult(); /** * Returns the value of the Experimental-Result AVP, of type Grouped. * * @return the value of the Experimental-Result AVP or null if it has not * been set on this message */ ExperimentalResultAvp getExperimentalResult(); /** * Sets the value of the Experimental-Result AVP, of type Grouped. * * @throws IllegalStateException * if setExperimentalResult has already been called */ void setExperimentalResult(ExperimentalResultAvp experimentalResult); /** * Returns the set of Failed-AVP AVPs. The returned array contains the AVPs * in the order they appear in the message. A return value of null implies * that no Failed-AVP AVPs have been set. The elements in the given array * are FailedAvp objects. */ FailedAvp[] getFailedAvps(); /** * Sets a single Failed-AVP AVP in the message, of type Grouped. * * @throws IllegalStateException * if setFailedAvp or setFailedAvps has already been called */ void setFailedAvp(FailedAvp failedAvp); /** * Sets the set of Failed-AVP AVPs, with all the values in the given array. * The AVPs will be added to message in the order in which they appear in * the array. * * Note: the array must not be altered by the caller following this call, * and getFailedAvps() is not guaranteed to return the same array instance, * e.g. an "==" check would fail. * * @throws IllegalStateException * if setFailedAvp or setFailedAvps has already been called */ void setFailedAvps(FailedAvp[] failedAvps); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy