Package de.javawi.jstun.attribute
Class MessageAttribute
- java.lang.Object
-
- de.javawi.jstun.attribute.MessageAttribute
-
- All Implemented Interfaces:
MessageAttributeInterface
- Direct Known Subclasses:
ChangeRequest,Dummy,ErrorCode,MappedResponseChangedSourceAddressReflectedFrom,MessageIntegrity,Password,UnknownAttribute,Username
public abstract class MessageAttribute extends java.lang.Object implements MessageAttributeInterface
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.javawi.jstun.attribute.MessageAttributeInterface
MessageAttributeInterface.MessageAttributeType
-
-
Field Summary
-
Fields inherited from interface de.javawi.jstun.attribute.MessageAttributeInterface
CHANGEDADDRESS, CHANGEREQUEST, DUMMY, ERRORCODE, MAPPEDADDRESS, MESSAGEINTEGRITY, PASSWORD, REFLECTEDFROM, RESPONSEADDRESS, SOURCEADDRESS, UNKNOWNATTRIBUTE, USERNAME
-
-
Constructor Summary
Constructors Constructor Description MessageAttribute()MessageAttribute(MessageAttributeInterface.MessageAttributeType type)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract byte[]getBytes()intgetLength()MessageAttributeInterface.MessageAttributeTypegetType()static MessageAttributeInterface.MessageAttributeTypeintToType(long type)static MessageAttributeparseCommonHeader(byte[] data)voidsetType(MessageAttributeInterface.MessageAttributeType type)static inttypeToInteger(MessageAttributeInterface.MessageAttributeType type)
-
-
-
Constructor Detail
-
MessageAttribute
public MessageAttribute()
-
MessageAttribute
public MessageAttribute(MessageAttributeInterface.MessageAttributeType type)
-
-
Method Detail
-
setType
public void setType(MessageAttributeInterface.MessageAttributeType type)
-
getType
public MessageAttributeInterface.MessageAttributeType getType()
-
typeToInteger
public static int typeToInteger(MessageAttributeInterface.MessageAttributeType type)
-
intToType
public static MessageAttributeInterface.MessageAttributeType intToType(long type)
-
getBytes
public abstract byte[] getBytes() throws UtilityException- Throws:
UtilityException
-
getLength
public int getLength() throws UtilityException- Throws:
UtilityException
-
parseCommonHeader
public static MessageAttribute parseCommonHeader(byte[] data) throws MessageAttributeParsingException
- Throws:
MessageAttributeParsingException
-
-