|
|||||||||
Atavism Version 2018.1 | AGIS API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatavism.server.voice.GroupMember
public class GroupMember
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 |
---|
protected OID memberOid
protected int priority
protected boolean allowedSpeaker
protected boolean currentSpeaker
protected boolean listening
protected byte voiceNumber
protected VoiceConnection memberCon
protected int index
protected int priorityIndex
protected VoiceGroup group
protected static int indexCounter
protected boolean expunged
Constructor Detail |
---|
public GroupMember(VoiceGroup group, OID memberOid2, int priority, boolean allowedSpeaker, boolean currentSpeaker, VoiceConnection memberCon, int maxVoiceChannels)
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 |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String logString(java.lang.String intro)
intro
- The descriptive string which will prepend the log entry.
public void setSpeakerForVoiceNumber(byte voiceNumber, GroupMember speaker)
voiceNumber
- The number of the voice channel opened to
the listener, unique within an single client.speaker
- The GroupMember instance representing the speaker.public VoiceGroup getGroup()
public OID getGroupOid()
public GroupMember getSpeakerForVoiceNumber(byte voiceNumber)
voiceNumber
- The number of the voice channel for which the speaker is to be returned.
public java.lang.Byte findFreeVoiceNumber()
public java.lang.Byte findVoiceNumberForSpeaker(GroupMember speaker)
speaker
- The GroupMember for the speaker.
public int voiceCount()
public boolean nowListeningTo(GroupMember speaker)
speaker
- The GroupMember for the speaker.
public java.util.List<GroupMember> membersListeningToSpeaker()
public boolean speakerIgnored(GroupMember speaker)
speaker
- The GroupMember for the speaker.
public void initializeIgnoredSpeakers(java.util.List<OID> ignored)
ignored
- A Listpublic void applyIgnoreUpdateMessage(WorldManagerClient.ExtensionMessage extMsg)
extMsg
- The ExtensionMessage containing the ignore list changes.public void addIgnoredSpeakerOids(java.util.List<OID> addToIgnored)
addToIgnored
- public void removeIgnoredSpeakerOids(java.util.List<OID> noLongerIgnored)
noLongerIgnored
- public OID getMemberOid()
public void setExpunged()
public boolean getExpunged()
|
Copyright © 2018 Dragonsan Studios Sp. z o.o. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |