Persistent, java.io.Serializable, java.lang.Runnablepublic class Intermud extends java.lang.Object implements java.lang.Runnable, Persistent, java.io.Serializable
ImudServices,
PersistentPeer,
Serialized Form| Modifier and Type | Field | Description |
|---|---|---|
int |
attempts |
|
java.util.Hashtable<java.lang.String,java.lang.String> |
banned |
|
ChannelList |
channels |
|
NameServer |
currentRouter |
|
java.io.DataInputStream |
input |
|
MudList |
muds |
|
java.util.List<NameServer> |
name_servers |
|
int |
password |
|
static long |
serialVersionUID |
|
boolean |
shutdown |
DELETED, MODIFIED, NEW, UNMODIFIED| Modifier and Type | Method | Description |
|---|---|---|
void |
addChannel(Channel c) |
Adds a channel to the channel list.
|
void |
addMud(I3Mud m) |
Adds a mud to the list of known muds.
|
static ChannelList |
getAllChannelList() |
|
static MudList |
getAllMudsList() |
|
ChannelList |
getChannelList() |
|
static java.lang.String |
getLocalChannel(java.lang.String c) |
Returns a String representing the local channel
name for the specified remote channel by
calling the ImudServices implementation of
getLocalChannel().
|
MudList |
getMudList() |
|
static NameServer |
getNameServer() |
|
int |
getPassword() |
|
static java.lang.String |
getRemoteChannel(java.lang.String c) |
Returns a String representing the remote channel
name for the specified local channel by
calling the ImudServices implementation of
getRemoteChannel().
|
static boolean |
isAPossibleMUDName(java.lang.String mud) |
Translates a user entered mud name into the mud's
canonical name.
|
static boolean |
isConnected() |
|
static boolean |
isUp(java.lang.String mud) |
Determines whether or not the specified mud is up.
|
void |
logMemory() |
|
static java.lang.String |
registerFakeChannel(java.lang.String c) |
Register a fake channel
|
void |
removeChannel(Channel c) |
Removes a channel from the channel list.
|
static java.lang.String |
removeFakeChannel(java.lang.String c) |
Register a fake channel
|
void |
removeMud(I3Mud m) |
Removed a mud from the list of known muds.
|
void |
restore() |
Prescribes a method for restoration from a data
store.
|
void |
run() |
|
void |
save() |
Prescribes a method for saving this object's data
to a data store.
|
void |
send(Packet p) |
Sends any valid subclass of Packet to the router.
|
static void |
sendPacket(Packet p) |
Sends a packet to the router.
|
void |
setChannelList(ChannelList list) |
Sets the channel list to a new channel list.
|
void |
setMudList(MudList list) |
Sets the list of known muds to the specified list.
|
void |
setPassword(int pass) |
Sets the Intermud 3 password.
|
static void |
setup(ImudServices imud,
PersistentPeer peer) |
Creates the initial link to an I3 router.
|
static void |
shutdown() |
|
void |
stop() |
Shuts down the connection to the router without
reconnecting.
|
static java.lang.String |
translateName(java.lang.String mud) |
Translates a user entered mud name into the mud's
canonical name.
|
public static final long serialVersionUID
public boolean shutdown
public java.io.DataInputStream input
public int attempts
public ChannelList channels
public MudList muds
public java.util.List<NameServer> name_servers
public int password
public NameServer currentRouter
public java.util.Hashtable<java.lang.String,java.lang.String> banned
public static void sendPacket(Packet p)
p - an instance of a subclass of com.planet_ink.coffee_mud.core.intermud.i3.packets.PacketPacketpublic static void setup(ImudServices imud, PersistentPeer peer)
imud - an instance of the mudlib implementation of com.planet_ink.coffee_mud.core.intermud.i3.packets.ImudServicespeer - and instance of the mudlib implementation of com.planet_ink.coffee_mud.core.intermud.i3.packets.IntermudPeerImudServices,
PersistentPeerpublic static java.lang.String translateName(java.lang.String mud)
mud - the user entered mud namepublic static boolean isAPossibleMUDName(java.lang.String mud)
mud - the user entered mud namepublic static java.lang.String registerFakeChannel(java.lang.String c)
c - the remote channel nameImudServices.getLocalChannel(java.lang.String)public static java.lang.String removeFakeChannel(java.lang.String c)
c - the remote channel nameImudServices.getLocalChannel(java.lang.String)public static java.lang.String getLocalChannel(java.lang.String c)
c - the remote channel nameImudServices.getLocalChannel(java.lang.String)public static java.lang.String getRemoteChannel(java.lang.String c)
c - the local channel nameImudServices.getRemoteChannel(java.lang.String)public static boolean isUp(java.lang.String mud)
mud - the name of the mud being checkedpublic static NameServer getNameServer()
public void restore()
throws PersistenceException
Persistentrestore in interface PersistentPersistenceException - thrown when an error occurs in restoringPersistentPeerpublic static boolean isConnected()
public void logMemory()
public void run()
run in interface java.lang.Runnablepublic void save()
throws PersistenceException
Persistentsave in interface PersistentPersistenceException - thrown when an error occurs in savingPersistentPeerpublic void send(Packet p)
p - the packet to sendpublic void stop()
Runnable.run()public void addChannel(Channel c)
c - the channel to add to the list of known channelsImudServices.getChannels()public void removeChannel(Channel c)
c - the channel to removepublic ChannelList getChannelList()
public void setChannelList(ChannelList list)
list - the new channel listpublic void addMud(I3Mud m)
m - the mud to addpublic void removeMud(I3Mud m)
m - the mud to removepublic MudList getMudList()
public static MudList getAllMudsList()
public static ChannelList getAllChannelList()
public void setMudList(MudList list)
list - the new list of mudspublic int getPassword()
public void setPassword(int pass)
pass - the new passwordpublic static void shutdown()