Atavism Version 2018.1AGIS API

atavism.server.voice
Class GroupMember

java.lang.Object
  extended by atavism.server.voice.GroupMember
Direct Known Subclasses:
PositionalGroupMember

public class GroupMember
extends java.lang.Object

A class to hold the attributes of a non-positional group member from the point of view of the voice plugin.


Field Summary
protected  boolean allowedSpeaker
          True if the member is allowed to speak; false otherwise.
protected  boolean currentSpeaker
          True if the member is currently speaking; false otherwise.
protected  boolean expunged
          True if this group member should no longer be referenced.
protected  VoiceGroup group
          The group that the member belongs to.
protected  int index
          Allocated from a counter, and used to impose a total ordering of GroupMembers.
protected static int indexCounter
          Used to disambiguate what would otherwise be a equal comparator results
protected  boolean listening
          True if the member is currently listening; false otherwise.
protected  VoiceConnection memberCon
          The VoiceConnection object associated with the member.
protected  OID memberOid
          The oid of the member.
protected  int priority
          The priority of the member.
protected  int priorityIndex
          A per-member temp used in the BasicVoiceGroup
protected  byte voiceNumber
          The voice number of the member when viewed as a speaker, present in the data frames sent by the client.
 
Constructor Summary
GroupMember(VoiceGroup group, OID memberOid2, int priority, boolean allowedSpeaker, boolean currentSpeaker, VoiceConnection memberCon, int maxVoiceChannels)
          GroupMember constructor
 
Method Summary
 void addIgnoredSpeakerOids(java.util.List<OID> addToIgnored)
          Adds the oids to the list of ignoredSpeaker oids
 void applyIgnoreUpdateMessage(WorldManagerClient.ExtensionMessage extMsg)
          If ignoredSpeakerOids is initialized, apply the updates in the extMsg.
 java.lang.Byte findFreeVoiceNumber()
          Return a voice number that is not currently associated with a speaker, or null if there is none.
 java.lang.Byte findVoiceNumberForSpeaker(GroupMember speaker)
          Return the voice number associated with the given speaker, or null if there is none.
 boolean getExpunged()
          Get the expunged status of this member.
 VoiceGroup getGroup()
          Return the group to which this member belongs.
 OID getGroupOid()
          Get the oid of the group to which this member belongs.
 OID getMemberOid()
          Return the memberOid
 GroupMember getSpeakerForVoiceNumber(byte voiceNumber)
          Return the speaker that this is currently listening to using the voice channel number voiceNumber, or null if there is none.
 void initializeIgnoredSpeakers(java.util.List<OID> ignored)
          Initializes the list of ignored speakers, and logs an error if it is already initialized.
 java.lang.String logString(java.lang.String intro)
          Provide a string description of the instance suitable for logging.
 java.util.List<GroupMember> membersListeningToSpeaker()
          Return a copy of the list of members listening to this.
 boolean nowListeningTo(GroupMember speaker)
          Return true if this is listening to the the given speaker; false otherwise
 void removeIgnoredSpeakerOids(java.util.List<OID> noLongerIgnored)
          Removes the oids from the list of ignoredSpeaker oids
 void setExpunged()
          Set this member to be expunged, which tells all users not to use it.
 void setSpeakerForVoiceNumber(byte voiceNumber, GroupMember speaker)
          Create a voice channel using number VoiceNumber between this acting as a listener and the supplied speaker.
 boolean speakerIgnored(GroupMember speaker)
          Returns true if the speaker has been ignored by the listener
 java.lang.String toString()
          Return a string describing the member.
 int voiceCount()
          Return the number of voice channels on which this is currently listening.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

memberOid

protected OID memberOid
The oid of the member.


priority

protected int priority
The priority of the member.


allowedSpeaker

protected boolean allowedSpeaker
True if the member is allowed to speak; false otherwise.


currentSpeaker

protected boolean currentSpeaker
True if the member is currently speaking; false otherwise.


listening

protected boolean listening
True if the member is currently listening; false otherwise.


voiceNumber

protected byte voiceNumber
The voice number of the member when viewed as a speaker, present in the data frames sent by the client. Not used for anything important.


memberCon

protected VoiceConnection memberCon
The VoiceConnection object associated with the member.


index

protected int index
Allocated from a counter, and used to impose a total ordering of GroupMembers.


priorityIndex

protected int priorityIndex
A per-member temp used in the BasicVoiceGroup


group

protected VoiceGroup group
The group that the member belongs to.


indexCounter

protected static int indexCounter
Used to disambiguate what would otherwise be a equal comparator results


expunged

protected boolean expunged
True if this group member should no longer be referenced.

Constructor Detail

GroupMember

public GroupMember(VoiceGroup group,
                   OID memberOid2,
                   int priority,
                   boolean allowedSpeaker,
                   boolean currentSpeaker,
                   VoiceConnection memberCon,
                   int maxVoiceChannels)
GroupMember constructor

Parameters:
group - The group to which the member belongs.
memberOid2 - The oid of the new member.
priority - The speaking priority that the member should be assigned; speakers with higher priorities will be heard over speakers with lower priorities.
allowedSpeaker - True if the new member should be allowed to speak; false otherwise.
currentSpeaker - True if the new member should be created speaking.
memberCon - The VoiceConnection object that embodies the connection to the voice server.
maxVoiceChannels - The maximum number of simultaneous voice channels going to any listener.
Method Detail

toString

public java.lang.String toString()
Return a string describing the member.

Overrides:
toString in class java.lang.Object
Returns:
A short descriptive string for the GroupMember.

logString

public java.lang.String logString(java.lang.String intro)
Provide a string description of the instance suitable for logging.

Parameters:
intro - The descriptive string which will prepend the log entry.
Returns:
The intro followed by the GroupMember description string.

setSpeakerForVoiceNumber

public void setSpeakerForVoiceNumber(byte voiceNumber,
                                     GroupMember speaker)
Create a voice channel using number VoiceNumber between this acting as a listener and the supplied speaker.

Parameters:
voiceNumber - The number of the voice channel opened to the listener, unique within an single client.
speaker - The GroupMember instance representing the speaker.

getGroup

public VoiceGroup getGroup()
Return the group to which this member belongs.


getGroupOid

public OID getGroupOid()
Get the oid of the group to which this member belongs.

Returns:
The oid of the member's group.

getSpeakerForVoiceNumber

public GroupMember getSpeakerForVoiceNumber(byte voiceNumber)
Return the speaker that this is currently listening to using the voice channel number voiceNumber, or null if there is none.

Parameters:
voiceNumber - The number of the voice channel for which the speaker is to be returned.
Returns:
The speaker associated with the voice channel, or null.

findFreeVoiceNumber

public java.lang.Byte findFreeVoiceNumber()
Return a voice number that is not currently associated with a speaker, or null if there is none.

Returns:
The available voice number.

findVoiceNumberForSpeaker

public java.lang.Byte findVoiceNumberForSpeaker(GroupMember speaker)
Return the voice number associated with the given speaker, or null if there is none.

Parameters:
speaker - The GroupMember for the speaker.
Returns:
The voice number corresponding to that speaker in the voice channels of this, or null.

voiceCount

public int voiceCount()
Return the number of voice channels on which this is currently listening.

Returns:
The listener's voice channel count.

nowListeningTo

public boolean nowListeningTo(GroupMember speaker)
Return true if this is listening to the the given speaker; false otherwise

Parameters:
speaker - The GroupMember for the speaker.
Returns:
True if this is listening to the speaker.

membersListeningToSpeaker

public java.util.List<GroupMember> membersListeningToSpeaker()
Return a copy of the list of members listening to this.

Returns:
A List holding the members current listening to this.

speakerIgnored

public boolean speakerIgnored(GroupMember speaker)
Returns true if the speaker has been ignored by the listener

Parameters:
speaker - The GroupMember for the speaker.
Returns:
True if the speaker has been ignored.

initializeIgnoredSpeakers

public void initializeIgnoredSpeakers(java.util.List<OID> ignored)
Initializes the list of ignored speakers, and logs an error if it is already initialized.

Parameters:
ignored - A List representing the initial contents of ignoredSpeakerOids.

applyIgnoreUpdateMessage

public void applyIgnoreUpdateMessage(WorldManagerClient.ExtensionMessage extMsg)
If ignoredSpeakerOids is initialized, apply the updates in the extMsg. If not, add the message to pendingIgnoreUpdateMessages.

Parameters:
extMsg - The ExtensionMessage containing the ignore list changes.

addIgnoredSpeakerOids

public void addIgnoredSpeakerOids(java.util.List<OID> addToIgnored)
Adds the oids to the list of ignoredSpeaker oids

Parameters:
addToIgnored -

removeIgnoredSpeakerOids

public void removeIgnoredSpeakerOids(java.util.List<OID> noLongerIgnored)
Removes the oids from the list of ignoredSpeaker oids

Parameters:
noLongerIgnored -

getMemberOid

public OID getMemberOid()
Return the memberOid


setExpunged

public void setExpunged()
Set this member to be expunged, which tells all users not to use it.


getExpunged

public boolean getExpunged()
Get the expunged status of this member.



Copyright © 2018 Dragonsan Studios Sp. z o.o.