CMChannelspublic interface ChannelsLibrary extends CMLibrary
| Modifier and Type | Interface | Description |
|---|---|---|
static class |
ChannelsLibrary.ChannelFlag |
The channel flags that define extra stuff that appears in or
gets automatically sent on a given channel.
|
static interface |
ChannelsLibrary.ChannelMsg |
The entry for the channel que, containing the CMMsg
object that was sent as the original message as well
as the timestamp when it was sent.
|
static interface |
ChannelsLibrary.CMChannel |
Basic Channel definition
|
idConverter| Modifier and Type | Method | Description |
|---|---|---|
void |
channelQueUp(int channelNumber,
CMMsg msg,
int subNameField) |
Adds the given channel message CMMsg event message to the que for the given
channel number.
|
java.util.List<Session> |
clearInvalidSnoopers(Session mySession,
int channelNumber) |
Searches all users online for any sessions that are snooping on the
given session, and also are not permitted to read the given channel
number.
|
void |
createAndSendChannelMessage(MOB mob,
java.lang.String channelName,
java.lang.String message,
boolean systemMsg) |
Creates and sends the given string message on the channel with the given name to all sessions who are
allowed to receive the message from the given sender.
|
ChannelsLibrary.CMChannel |
createNewChannel(java.lang.String name,
java.lang.String i3Name,
java.lang.String imc2Name,
java.lang.String mask,
java.util.Set<ChannelsLibrary.ChannelFlag> flags,
java.lang.String colorOverrideANSI,
java.lang.String colorOverrideWords) |
Creates a new channel object.
|
java.lang.String |
findChannelName(java.lang.String channelName) |
Returns the official channel name of the channel with the
given name or which starts with the given name.
|
ChannelsLibrary.CMChannel |
getChannel(int channelNumber) |
Returns the CMChannel object for the given
registered channel from 0 - getNumChannels();
Basically this is almost all you need, but
there's more....
|
ChannelsLibrary.CMChannel |
getChannel(java.lang.String channelName) |
Returns the official channel object of the channel with the
given name.
|
int |
getChannelCodeNumber(java.lang.String channelName) |
Returns the bitmask appropriate to the channel of the given
name, or which starts with the given string.
|
int |
getChannelIndex(java.lang.String channelName) |
Returns the official index number of the channel with the
given name or which starts with the given name.
|
java.lang.String[] |
getChannelNames() |
Returns an array of all the names of all the channels.
|
java.util.List<ChannelsLibrary.ChannelMsg> |
getChannelQue(int channelNumber,
int numNewToSkip,
int numToReturn,
MOB mob) |
Generates a list of previous channel messages, in ChannelMsg
object format.
|
int |
getChannelQueIndex(int channelNumber,
MOB mob,
long oldestDateMs) |
Returns the lowest page index to messages in the given channel after the given date
|
int |
getChannelQuePageEnd(int channelNumber,
MOB mob) |
Returns the highest page index for messages in the given channel, for the given reader.
|
java.lang.String |
getExtraChannelDesc(java.lang.String channelName) |
Returns the friendly readable description of the channel
with the given name, or which starts with the given string.
|
java.util.List<java.lang.String> |
getFlaggedChannelNames(ChannelsLibrary.ChannelFlag flag,
MOB mob) |
Returns the list of channel names that have the given
ChannelFlag set.
|
java.util.List<ChannelsLibrary.CMChannel> |
getI3ChannelsList() |
Returns all the CMChannel objects for any channels flagged
as being mapped to I3.
|
java.util.List<ChannelsLibrary.CMChannel> |
getIMC2ChannelsList() |
Returns all the CMChannel objects for any channels flagged
as being mapped to IMC2.
|
int |
getNumChannels() |
Returns the number of registered channels
|
int |
loadChannels(java.lang.String list,
java.lang.String ilist,
java.lang.String imc2list) |
Clears the channels list and then reloads it from the three given comma-delimited
list of coded strings.
|
boolean |
mayReadThisChannel(MOB sender,
boolean areaReq,
Session ses,
int channelNumber) |
Returns whether the given Mob can read a channel message from the given sender, on
a particular channel.
|
boolean |
mayReadThisChannel(MOB sender,
boolean areaReq,
MOB M,
int channelNumber) |
Returns whether the given Mob can read a channel message from the given sender, on
a particular channel.
|
boolean |
mayReadThisChannel(MOB sender,
boolean areaReq,
MOB M,
int channelNumber,
boolean offlineOK) |
Returns whether the given Mob can read a channel message from the given sender, on
a particular channel.
|
boolean |
mayReadThisChannel(MOB M,
int channelNumber,
boolean zapCheckOnly) |
Returns whether the given Mob can read a channel message from the given sender, on
a particular channel.
|
void |
restoreInvalidSnoopers(Session mySession,
java.util.List<Session> invalid) |
Iterates through the given list of sessions and forces them all to snoop on
the given session.
|
java.util.List<ChannelsLibrary.ChannelMsg> |
searchChannelQue(MOB mob,
int channelNumber,
java.lang.String srchTerms,
int maxReturn) |
Searches the list of previous channel messages, in ChannelMsg
object format.
|
boolean |
sendChannelCMMsgTo(Session ses,
boolean areareq,
int channelNumber,
CMMsg msg,
MOB sender) |
Sends the given channel message from the given sender to the given session on the
given channelNumbered channel.
|
activate, getServiceClient, L, propertiesLoaded, shutdowncopyOf, ID, initializeClass, name, newInstanceint getNumChannels()
getChannelIndex(String)ChannelsLibrary.CMChannel getChannel(int channelNumber)
channelNumber - the index of the channelgetNumChannels()java.util.List<ChannelsLibrary.ChannelMsg> getChannelQue(int channelNumber, int numNewToSkip, int numToReturn, MOB mob)
channelNumber - the channel id number/indexnumNewToSkip - starting message number (0 based)numToReturn - total number of messages to returnmob - the channel readergetChannelIndex(String),
ChannelsLibrary.ChannelMsg,
getChannelQuePageEnd(int, MOB)java.util.List<ChannelsLibrary.ChannelMsg> searchChannelQue(MOB mob, int channelNumber, java.lang.String srchTerms, int maxReturn)
mob - the channel readerchannelNumber - the channel id number/indexsrchTerms - the string to search formaxReturn - max number of messages to returngetChannelIndex(String),
ChannelsLibrary.ChannelMsg,
getChannelQuePageEnd(int, MOB)int getChannelQuePageEnd(int channelNumber,
MOB mob)
channelNumber - the channel id number/indexmob - the channel readergetChannelIndex(String),
ChannelsLibrary.ChannelMsg,
getChannelQue(int, int, int, MOB)int getChannelQueIndex(int channelNumber,
MOB mob,
long oldestDateMs)
channelNumber - the channel id number/indexmob - the channel readeroldestDateMs - the oldest date timestampboolean mayReadThisChannel(MOB sender, boolean areaReq, MOB M, int channelNumber)
sender - the sender of the channel messageareaReq - true if the message can only be read by someone in the senders AreaM - the potential receiver of the message to confirmchannelNumber - the channel index numbergetNumChannels(),
mayReadThisChannel(MOB, int, boolean),
mayReadThisChannel(MOB, boolean, Session, int),
mayReadThisChannel(MOB, boolean, MOB, int, boolean)boolean mayReadThisChannel(MOB sender, boolean areaReq, MOB M, int channelNumber, boolean offlineOK)
sender - the sender of the channel messageareaReq - true if the message can only be read by someone in the senders AreaM - the potential receiver of the message to confirmchannelNumber - the channel index numberofflineOK - true if the channel reader can be read, or offline, false if they must be onlinegetChannelIndex(String),
mayReadThisChannel(MOB, int, boolean),
mayReadThisChannel(MOB, boolean, Session, int),
mayReadThisChannel(MOB, boolean, MOB, int)boolean mayReadThisChannel(MOB sender, boolean areaReq, Session ses, int channelNumber)
sender - the sender of the channel messageareaReq - true if the message can only be read by someone in the senders Areases - the potential receiver session of the message to confirmchannelNumber - the channel index numbergetNumChannels(),
mayReadThisChannel(MOB, int, boolean),
mayReadThisChannel(MOB, boolean, MOB, int),
mayReadThisChannel(MOB, boolean, MOB, int, boolean)boolean mayReadThisChannel(MOB M, int channelNumber, boolean zapCheckOnly)
M - the potential receiver of the message to confirmchannelNumber - the channel index numberzapCheckOnly - the channel index numbergetChannelIndex(String),
mayReadThisChannel(MOB, boolean, MOB, int),
mayReadThisChannel(MOB, boolean, Session, int),
mayReadThisChannel(MOB, boolean, MOB, int, boolean)void channelQueUp(int channelNumber,
CMMsg msg,
int subNameField)
channelNumber - the channel index numbermsg - the channel message msg that was sent aroundsubNameField - extra audience data for the given new messagegetNumChannels(),
getChannelIndex(String)int getChannelIndex(java.lang.String channelName)
channelName - the channel string to search forgetNumChannels()int getChannelCodeNumber(java.lang.String channelName)
channelName - the name of the channeljava.util.List<java.lang.String> getFlaggedChannelNames(ChannelsLibrary.ChannelFlag flag, MOB mob)
flag - the flag to find channels formob - the mob whose privacy flag to respect, or nullChannelsLibrary.ChannelFlagjava.lang.String getExtraChannelDesc(java.lang.String channelName)
channelName - the name of the channeljava.util.List<ChannelsLibrary.CMChannel> getIMC2ChannelsList()
java.util.List<ChannelsLibrary.CMChannel> getI3ChannelsList()
java.lang.String[] getChannelNames()
getNumChannels()java.lang.String findChannelName(java.lang.String channelName)
channelName - the channel string to search forgetNumChannels()ChannelsLibrary.CMChannel getChannel(java.lang.String channelName)
channelName - the channel string to search forgetNumChannels()java.util.List<Session> clearInvalidSnoopers(Session mySession, int channelNumber)
mySession - the session to search for snoopers ofchannelNumber - the channel number to cross reference snoopers bygetNumChannels(),
restoreInvalidSnoopers(Session, List)void restoreInvalidSnoopers(Session mySession, java.util.List<Session> invalid)
mySession - the session to search restoring snooping oninvalid - the list of sessions to force resnoopingclearInvalidSnoopers(Session, int)int loadChannels(java.lang.String list,
java.lang.String ilist,
java.lang.String imc2list)
list - the main game channel listilist - the list of i3 channelsimc2list - the list of imc2 channelsboolean sendChannelCMMsgTo(Session ses, boolean areareq, int channelNumber, CMMsg msg, MOB sender)
ses - the session to send the channel message toareareq - true if the sender and session must be in the same area, false otherwisechannelNumber - the channel index number of the messagemsg - the constructed CMMsg channel messagesender - the sender of the channel messagegetNumChannels(),
createAndSendChannelMessage(MOB, String, String, boolean)void createAndSendChannelMessage(MOB mob, java.lang.String channelName, java.lang.String message, boolean systemMsg)
mob - the sender of the messagechannelName - the name of the channel to send the message onmessage - the string message to send on the channelsystemMsg - true to format as a system message, false for a normal chat messagesendChannelCMMsgTo(Session, boolean, int, CMMsg, MOB)ChannelsLibrary.CMChannel createNewChannel(java.lang.String name, java.lang.String i3Name, java.lang.String imc2Name, java.lang.String mask, java.util.Set<ChannelsLibrary.ChannelFlag> flags, java.lang.String colorOverrideANSI, java.lang.String colorOverrideWords)
name - the channel namei3Name - empty string, or the mapped name of the i3 channelimc2Name - empty string, or the mapped name of the imc2 channelmask - the zapper mask for who may read the channelflags - the channel flags to set for the given channelcolorOverrideANSI - empty string for default, or the color code for this channelcolorOverrideWords - empty string for default, or the color code for this channelChannelsLibrary.CMChannel,
ChannelsLibrary.ChannelFlag