JSIP API v1.2
November 2006

javax.sip.header
Interface EventHeader

All Superinterfaces:
java.lang.Cloneable, Header, Parameters, java.io.Serializable

public interface EventHeader
extends Parameters, Header

This interface represents the Event SIP header, as defined by RFC3265, this header is not part of RFC3261.

For the purposes of matching responses and NOTIFY messages with SUBSCRIBE messages, the event-type portion of the "Event" header is compared byte-by-byte, and the "id" parameter token (if present) is compared byte-by-byte. An "Event" header containing an "id" parameter never matches an "Event" header without an "id" parameter. No other parameters are considered when performing a comparison, i.e. "Event: foo; id=1234" would match "Event: foo; param=abcd; id=1234", but not "Event: Foo; id=1234".

There MUST be exactly one event type listed per event header. Multiple events per message are disallowed i.e Subscribers MUST include exactly one "Event" header in SUBSCRIBE requests, indicating to which event or class of events they are subscribing. The "Event" header will contain a token which indicates the type of state for which a subscription is being requested. This token will correspond to an event package which further describes the semantics of the event or event class. The "Event" header MAY also contain an "id" parameter. When a subscription is created in the notifier, it stores the event package name and the "Event" header "id" parameter (if present) as part of the subscription information.

This "id" parameter, if present:

If the event package to which the event token corresponds defines behavior associated with the body of its SUBSCRIBE requests or parameters for the Event header, those semantics apply.

Author:
BEA Systems, NIST

Field Summary
static java.lang.String NAME
          Name of EventHeader
 
Method Summary
 java.lang.String getEventId()
          Gets the id of the EventHeader.
 java.lang.String getEventType()
          Gets the eventType of the EventHeader.
 void setEventId(java.lang.String eventId)
          Sets the id to the newly supplied eventId string.
 void setEventType(java.lang.String eventType)
          Sets the eventType to the newly supplied eventType string.
 
Methods inherited from interface javax.sip.header.Parameters
getParameter, getParameterNames, removeParameter, setParameter
 
Methods inherited from interface javax.sip.header.Header
clone, equals, getName, hashCode, toString
 

Field Detail

NAME

static final java.lang.String NAME
Name of EventHeader

See Also:
Constant Field Values
Method Detail

setEventType

void setEventType(java.lang.String eventType)
                  throws java.text.ParseException
Sets the eventType to the newly supplied eventType string.

Parameters:
eventType - - the new string defining the eventType supported in this EventHeader
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the eventType value.

getEventType

java.lang.String getEventType()
Gets the eventType of the EventHeader.

Returns:
the string object identifing the eventType of EventHeader.

setEventId

void setEventId(java.lang.String eventId)
                throws java.text.ParseException
Sets the id to the newly supplied eventId string.

Parameters:
eventId - - the new string defining the eventId of this EventHeader
Throws:
java.text.ParseException - which signals that an error has been reached unexpectedly while parsing the eventId value.

getEventId

java.lang.String getEventId()
Gets the id of the EventHeader. This method may return null if the eventId is not set.

Returns:
the string object identifing the eventId of EventHeader.

JSIP API v1.2
November 2006

If you have any comments, please mail them to JAIN-SIP-INTEREST@java.sun.com after subscribing at http://archives.java.sun.com
Copyright - 2006 BEA Systems and Sun Microsystems