Class como.irc.ComObjIRC
All Packages Class Hierarchy This Package Previous Next Index
Class como.irc.ComObjIRC
java.lang.Object
|
+----como.irc.ComObjIRC
- public class ComObjIRC
- extends Object
- implements ComObj
-
do_not_get_any_more_messages
-
-
addMe(User)
- Add myself to this Commlet.
-
addUser(int)
- Adds a user who has already logged in.
-
ask(Msg)
- ask msg.to msg.
-
destroy()
- Destroy everything in here.
-
getCommlet()
- return the Commlet
-
getMasterID()
- returns the master ID.
-
getMyID()
- returns my ID.
-
getUser(int)
- return the User-information of the user with id.
-
getUserName(int)
- return the Username of the user with id.
-
getUsers()
- return a Vector of all involved Users
-
iAmMaster()
- return true if i am the master
-
kickUser(int, String)
- kickUser kicks a User out of this channel!
It send him a KICK_USER message!
-
loadAudioClip(String)
- Load an audioclip with the specified filename!
-
loadImage(String)
- Load a picture with the specified filename!
It will be loaded from the BaseDocument's http-server.
-
loginUser(User)
- Asks commlet if the User is admitted to enter.
-
logout()
- This is called in order to quit the ComObj.
-
openInputStream(String)
- Open an input-stream to the specified file!
-
preHandleMsg(Msg)
- Here we can handle msg for the ComObj (or messages
important for the ComObj)
-
removeOldCachedMsg()
- Search the cache if I have messages older than 60 seconds;
if true delete them.
-
sendTo(Msg)
- Send Msg to msg.to
-
sendToAll(Msg)
- Send Msg to all users of this session including myself.
-
sendToGroup(int[], Msg)
- Send Msg to group of users of this session.
-
sendToOthers(Msg)
- Send Msg to all users of this session except myself.
-
setCommlet(Commlet)
- Tell the ComObj about his commlet.
-
setCommletName(String)
- set the Name of the commlet
-
setLocalUser(User)
- Change some attributes of the local user.
-
setNewTopic(String)
- set a new topic (in the irc-channel) and tell others
about it.
-
toString()
-
do_not_get_any_more_messages
protected boolean do_not_get_any_more_messages
setCommletName
public synchronized void setCommletName(String name)
- set the Name of the commlet
setCommlet
public synchronized void setCommlet(Commlet c)
- Tell the ComObj about his commlet. This is necessary this way
because the ComObj is instantiated before the commlet
getCommlet
public Commlet getCommlet()
- return the Commlet
getMasterID
public synchronized int getMasterID()
- returns the master ID.
-1 means it is still unknown.
getMyID
public int getMyID()
- returns my ID.
-1 means it is still unknown (I didn't login myself to this commlet/comobj).
iAmMaster
public synchronized boolean iAmMaster()
- return true if i am the master
setNewTopic
public synchronized void setNewTopic(String topic)
- set a new topic (in the irc-channel) and tell others
about it.
setLocalUser
public synchronized void setLocalUser(User user)
- Change some attributes of the local user.
Some can't be changed (NICK, SOCKET, ID,...).
getUser
public synchronized User getUser(int id)
- return the User-information of the user with id.
getUserName
public synchronized String getUserName(int id)
- return the Username of the user with id.
getUsers
public synchronized Vector getUsers()
- return a Vector of all involved Users
sendTo
public synchronized void sendTo(Msg msg)
- Send Msg to msg.to
sendToOthers
public synchronized void sendToOthers(Msg msg)
- Send Msg to all users of this session except myself.
sendToAll
public synchronized void sendToAll(Msg msg)
- Send Msg to all users of this session including myself.
sendToGroup
public synchronized void sendToGroup(int to[],
Msg msg)
- Send Msg to group of users of this session.
ask
public synchronized Msg ask(Msg msg)
- ask msg.to msg. Then wait for a return-msg. The type
of the return msg must be -msg.type of the question!!
kickUser
public synchronized void kickUser(int id,
String reason)
- kickUser kicks a User out of this channel!
It send him a KICK_USER message!
preHandleMsg
public synchronized Msg preHandleMsg(Msg msg)
- Here we can handle msg for the ComObj (or messages
important for the ComObj)
removeOldCachedMsg
protected synchronized void removeOldCachedMsg()
- Search the cache if I have messages older than 60 seconds;
if true delete them.
loginUser
public synchronized int loginUser(User user)
- Asks commlet if the User is admitted to enter.
addUser
public synchronized void addUser(int userid)
- Adds a user who has already logged in.
It tells this user, who i am and if i am the master
addMe
public synchronized void addMe(User ego)
- Add myself to this Commlet.
If i am master then set the topic
logout
public synchronized void logout()
- This is called in order to quit the ComObj.
It also tells the server, that i quitted.
destroy
public void destroy()
- Destroy everything in here. I.e. also quit the commlet.
It will also call logout().
loadImage
public Image loadImage(String filename)
- Load a picture with the specified filename!
It will be loaded from the BaseDocument's http-server.
loadAudioClip
public AudioClip loadAudioClip(String filename)
- Load an audioclip with the specified filename!
openInputStream
public InputStream openInputStream(String filename)
- Open an input-stream to the specified file!
toString
public String toString()
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index