org.littleshoot.stun.stack.message.turn
Class AbstractStunDataMessage

java.lang.Object
  extended by org.littleshoot.stun.stack.message.AbstractStunMessage
      extended by org.littleshoot.stun.stack.message.turn.AbstractStunDataMessage
All Implemented Interfaces:
StunMessage, VisitableStunMessage
Direct Known Subclasses:
DataIndication, SendIndication

public abstract class AbstractStunDataMessage
extends AbstractStunMessage

Abstract class for TURN messages containing data, particularly the Send Indication and the Data Indication messages. These are essentially the same message, just passed in different directions.


Constructor Summary
AbstractStunDataMessage(StunMessageType messageType, byte[] data, InetSocketAddress remoteAddress)
          Creates a new abstract STUN data message.
AbstractStunDataMessage(org.apache.commons.id.uuid.UUID transactionId, StunMessageType messageType, Map<StunAttributeType,StunAttribute> attributes)
          Creates a new STUN data message.
 
Method Summary
 byte[] getData()
          Accessor for the data.
 InetSocketAddress getRemoteAddress()
          Accessor for the remote address.
 
Methods inherited from class org.littleshoot.stun.stack.message.AbstractStunMessage
createAttributes, createRemoteAddress, getAttributes, getBodyLength, getTotalLength, getTransactionId, getType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.littleshoot.stun.stack.message.VisitableStunMessage
accept
 

Constructor Detail

AbstractStunDataMessage

public AbstractStunDataMessage(org.apache.commons.id.uuid.UUID transactionId,
                               StunMessageType messageType,
                               Map<StunAttributeType,StunAttribute> attributes)
Creates a new STUN data message.

Parameters:
transactionId - The transaction ID.
messageType - The message type;
attributes - The message attributes.

AbstractStunDataMessage

public AbstractStunDataMessage(StunMessageType messageType,
                               byte[] data,
                               InetSocketAddress remoteAddress)
Creates a new abstract STUN data message.

Parameters:
messageType - The type of message.
data - The data.
remoteAddress - The address the data came from or should be sent to.
Method Detail

getData

public final byte[] getData()
Accessor for the data.

Returns:
The data.

getRemoteAddress

public final InetSocketAddress getRemoteAddress()
Accessor for the remote address.

Returns:
The remote address.


Copyright © 2013 LittleShoot. All Rights Reserved.