public interface EventHeader extends Parameters, Header
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:
Modifier and Type | Method and Description |
---|---|
String |
getEventId()
Gets the id of the EventHeader.
|
String |
getEventType()
Gets the eventType of the EventHeader.
|
void |
setEventId(String eventId)
Sets the id to the newly supplied eventId string.
|
void |
setEventType(String eventType)
Sets the eventType to the newly supplied eventType string.
|
getParameter, getParameterNames, removeParameter, setParameter
static final String NAME
void setEventType(String eventType) throws ParseException
eventType
- - the new string defining the eventType supported
in this EventHeaderParseException
- which signals that an error has been reached
unexpectedly while parsing the eventType value.String getEventType()
void setEventId(String eventId) throws ParseException
eventId
- - the new string defining the eventId of this EventHeaderParseException
- which signals that an error has been reached
unexpectedly while parsing the eventId value.String getEventId()
Copyright © 2014. All Rights Reserved.