org.lastbamboo.common.ice.candidate
Interface IceCandidate

All Known Implementing Classes:
AbstractIceCandidate, IceTcpActiveCandidate, IceTcpHostPassiveCandidate, IceTcpPeerReflexiveCandidate, IceTcpRelayPassiveCandidate, IceTcpServerReflexiveSoCandidate, IceUdpHostCandidate, IceUdpPeerReflexiveCandidate, IceUdpRelayCandidate, IceUdpServerReflexiveCandidate

public interface IceCandidate

This is an interface for an ICE "candidate" as defined in the IETF draft "draft-ietf-mmusic-ice-05.txt". A candidate is typically a media-level attributed in SDP data transferred using SIP, but a node can learn of candidates using any other offer/answere protocol or mode of describing the media.


Method Summary
<T> T
accept(IceCandidateVisitor<T> visitor)
          Accepts the specified visitor to an ICE candidate.
 IceCandidate getBaseCandidate()
          Accessor for the base candidate for this candidate.
 int getComponentId()
          Accessor for the component ID of this candidate.
 String getFoundation()
          Accessor for the candidate's foundation.
 long getPriority()
          Accessor for the priority of the candidate.
 InetAddress getRelatedAddress()
           
 int getRelatedPort()
           
 InetSocketAddress getSocketAddress()
          Accessor for the address and port of the candidate.
 IceTransportProtocol getTransport()
          Accessor for the type of transport of this candidate, such as TCP or UDP.
 IceCandidateType getType()
          Gets the type of the ICE candidate.
 boolean isControlling()
          Returns whether or not this peer is the controlling peer.
 boolean isUdp()
           
 void setControlling(boolean controlling)
          Sets the controlling status of this candidate.
 

Method Detail

getSocketAddress

InetSocketAddress getSocketAddress()
Accessor for the address and port of the candidate.

Returns:
The address and port of the candidate.

getPriority

long getPriority()
Accessor for the priority of the candidate.

Returns:
The priority of the candidate.

getTransport

IceTransportProtocol getTransport()
Accessor for the type of transport of this candidate, such as TCP or UDP.

Returns:
The transport for this candidate.

accept

<T> T accept(IceCandidateVisitor<T> visitor)
Accepts the specified visitor to an ICE candidate.

Type Parameters:
T - The class to return.
Parameters:
visitor - The visitor to accept.
Returns:
The class the visitor created.

getType

IceCandidateType getType()
Gets the type of the ICE candidate.

Returns:
The type of the ICE candidate.

getComponentId

int getComponentId()
Accessor for the component ID of this candidate. A component of a candidate is the number of the component of the media stream it represents. Many media streams will only have one component, starting with "1", but others might have two or more, such as a media stream with RTP and RTCP.

Returns:
The component ID.

getFoundation

String getFoundation()
Accessor for the candidate's foundation.

Returns:
The candidate's foundation.

getBaseCandidate

IceCandidate getBaseCandidate()
Accessor for the base candidate for this candidate. For host and relay candidates, the base candidate is the same as the candidate itself. For server reflexive candidates, the candidate is the host candidate used to determine the server reflexive address.

Returns:
The base candidate.

isControlling

boolean isControlling()
Returns whether or not this peer is the controlling peer.

Returns:
true if this peer is the controlling peer, otherwise false.

getRelatedAddress

InetAddress getRelatedAddress()

getRelatedPort

int getRelatedPort()

setControlling

void setControlling(boolean controlling)
Sets the controlling status of this candidate.

Parameters:
controlling - The controlling status.

isUdp

boolean isUdp()


Copyright © 2013 LittleShoot. All Rights Reserved.