|
|||||||||
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.plugins.VoicePlugin.VoiceConManager
public static class VoicePlugin.VoiceConManager
A class with locking to manage the Maps and Sets of connections. The data structure that holds the maps:
playerOid to VoiceConnection playerOid to VoiceGroup groupOid to VoiceGroup instanceOid to set of groups with members in that instance
Field Summary | |
---|---|
protected java.util.concurrent.locks.Lock |
lock
|
Constructor Summary | |
---|---|
VoicePlugin.VoiceConManager()
|
Method Summary | |
---|---|
void |
addGroup(OID groupOid,
VoiceGroup group)
Add a mapping from groupOid to group |
java.util.List<GroupMember> |
getAllPositionalGroupMembers()
Get a list of all GroupMembers that are members of some PositionalVoiceGroup. |
VoiceGroup |
getGroup(OID groupOid)
Get the group for the given groupOid. |
VoiceConnection |
getPlayerCon(OID playerOid)
Get the VoiceConnection object for the player with the given oid. |
int |
getPlayerCount()
|
VoiceGroup |
getPlayerGroup(OID playerOid)
Get the group associated with the playerOid. |
PositionalGroupMember |
getPositionalMember(OID playerOid)
If the player with the given oid is in a positional group, return its PositionalGroupMember; else return null. |
java.util.List<OID> |
groupPlayers(OID groupOid)
Get a list of the players in a group. |
boolean |
maybeAddToGroupInstances(OID instanceOid,
PositionalVoiceGroup group)
If the group is not yet in the set of groups associated with the instanceOid, add it. |
java.util.Set<PositionalVoiceGroup> |
removeInstance(OID instanceOid)
Remove the mapping from the instanceOid to the set of PositionalVoiceGroups, and return that set. |
void |
removePlayer(OID playerOid)
Remove a player from all ConnecitonManager maps. |
void |
setPlayerCon(OID playerOid,
VoiceConnection con)
Create the mapping from playerOid to its VoiceConnection object. |
void |
setPlayerGroup(OID playerOid,
VoiceGroup group)
Create the mapping from the playerOid to the VoiceGroup that contains the player. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient java.util.concurrent.locks.Lock lock
Constructor Detail |
---|
public VoicePlugin.VoiceConManager()
Method Detail |
---|
public void addGroup(OID groupOid, VoiceGroup group)
groupOid
- The oid of the group.group
- The group for which the mapping should be
added.public java.util.List<OID> groupPlayers(OID groupOid)
groupOid
- The oid of the group.
public VoiceGroup getGroup(OID groupOid)
groupOid
- The oid of the group to be returned.
public void removePlayer(OID playerOid)
playerOid
- The oid of the player to be removed.public VoiceConnection getPlayerCon(OID playerOid)
playerOid
- The oid of the player whose
VoiceConnection should be returned.
public void setPlayerCon(OID playerOid, VoiceConnection con)
playerOid
- The oid of the player for which the
mapping should be created.con
- The VoiceConnection to be associated with the
playerOid.public void setPlayerGroup(OID playerOid, VoiceGroup group)
playerOid
- The oid of the player contained in the
VoiceGroup.group
- The group to be associated with the playerOid.public VoiceGroup getPlayerGroup(OID playerOid)
playerOid
- The oid of the player whose VoiceGroup
should be returned.
public PositionalGroupMember getPositionalMember(OID playerOid)
playerOid
- The oid of the player whose member should
be returned.
public java.util.List<GroupMember> getAllPositionalGroupMembers()
public boolean maybeAddToGroupInstances(OID instanceOid, PositionalVoiceGroup group)
instanceOid
- The oid of the instance to which the
group should be added.group
- The group to be added to the list of groups
associated with this instanceOid.public java.util.Set<PositionalVoiceGroup> removeInstance(OID instanceOid)
instanceOid
- The oid of the instance whose mapping
should be removed.
public int getPlayerCount()
|
Copyright © 2018 Dragonsan Studios Sp. z o.o. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |