public class Close extends PCEPObject
Represents a PCEP CLOSE Object, as defined in RFC 5440.
From RFC 5440 Section 7.17. CLOSE Object
The CLOSE object MUST be present in each Close message. There MUST
be only one CLOSE object per Close message. If a Close message is
received that contains more than one CLOSE object, the first CLOSE
object is the one that must be processed. Other CLOSE objects MUST
be silently ignored.
CLOSE Object-Class is 15.
CLOSE Object-Type is 1.
The format of the CLOSE object body is as follows:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved | Flags | Reason |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
// Optional TLVs //
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Reserved (16 bits): This field MUST be set to zero on transmission
and MUST be ignored on receipt.
Flags (8 bits): No flags are currently defined. The Flag field MUST
be set to zero on transmission and MUST be ignored on receipt.
Reason (8 bits): specifies the reason for closing the PCEP session.
The setting of this field is optional. IANA manages the codespace
of the Reason field. The following values are currently defined:
Reasons
Value Meaning
1 No explanation provided
2 DeadTimer expired
3 Reception of a malformed PCEP message
4 Reception of an unacceptable number of unknown
requests/replies
5 Reception of an unacceptable number of unrecognized
PCEP messages
Optional TLVs may be included within the CLOSE object body. The
specification of such TLVs is outside the scope of this document.
| Modifier and Type | Field and Description |
|---|---|
static int |
reason_MAX_VALUE |
Ibit, log, object_bytes, ObjectClass, ObjectLength, OT, Pbit, Res| Constructor and Description |
|---|
Close() |
Close(byte[] bytes,
int offset) |
| Modifier and Type | Method and Description |
|---|---|
void |
decode()
Decode CLOSE message.
|
void |
encode()
Encode CLOSE message
Only reason is encoded.
|
boolean |
equals(Object obj) |
int |
getReason()
Gets the reason for closing the PCEP Session
|
int |
hashCode() |
void |
setReason(int reason)
Sets the reason for closing the PCEP Session
|
decode, decodeHeader, encode_header, getBytes, getLength, getObject_bytes, getObjectClass, getObjectClass, getObjectLength, getObjectType, getOT, getRes, isIbit, isPbit, setIbit, setObject_bytes, setObjectClass, setObjectLength, setOT, setPbit, setRes, supportedObjectpublic Close()
public Close(byte[] bytes,
int offset)
throws MalformedPCEPObjectException
MalformedPCEPObjectExceptionpublic void encode()
encode in interface PCEPElementencode in class PCEPObjectpublic void decode()
throws MalformedPCEPObjectException
decode in class PCEPObjectMalformedPCEPObjectExceptionpublic int getReason()
public void setReason(int reason)
reason - reason for closing the PCEP Sessionpublic int hashCode()
hashCode in class PCEPObjectpublic boolean equals(Object obj)
equals in class PCEPObjectCopyright © 2016. All rights reserved.