Class Icq.IcqBean
All Packages Class Hierarchy This Package Previous Next Index
Class Icq.IcqBean
Object
|
+----Icq.IcqBean
- public class IcqBean
- extends Object
User friendly class for ICQ component control
- Version:
- 1.0
- Author:
- Egidijus Neniskis - Lithuania
-
Icq.IcqBean()
- is used by visual builders
-
Icq.IcqBean(String, int)
- constructor, which initializes password and uin too
-
addMessageEventListener(MessageEventListener)
- adds the specified message event listener to recieve message events from this ICQcomponent.
-
deleteMessage(Message)
- deletes message from receivedList
-
getPassword()
-
-
getPort()
-
-
getUin()
- gets uin
-
notifyMessageReceived(String)
- fires event if listener is registered and message is received, connection succeeded or connection was broken
-
removeMessageEventListener(MessageEventListener)
- removes listener
-
sendMessage(int, String)
- sends message (puts message into sendingList)
-
setPassword(String)
- sets password
param password new user password, used at login time
-
setPort(int)
- sets port.
-
setTargetHost(InetAddress)
- sets target host address.
-
setUin(int)
- sets user's uin
-
startEngine()
- starts icq 'kernel' process, which connects to server and is responsible for communication
-
stopEngine()
- properly breaks communication with server
-
takeMessages()
-
-
takeStatus()
-
IcqBean
public IcqBean()
- is used by visual builders
IcqBean
public IcqBean(String password,
int uin)
- constructor, which initializes password and uin too
- Parameters:
- password - user's personal identification password
- uin - personal identification number, used by ICQ server
addMessageEventListener
public synchronized void addMessageEventListener(MessageEventListener listener) throws TooManyListenersException
- adds the specified message event listener to recieve message events from this ICQcomponent.
- Parameters:
- listener - message event listener
- Throws: TooManyListenersException
- if tried to register more than one listener
deleteMessage
public synchronized void deleteMessage(Message m)
- deletes message from receivedList
- Parameters:
- m - message, which mus be removed from receivedList
getPassword
public synchronized java.lang.String getPassword()
- Returns:
- user password
getPort
public synchronized int getPort()
- Returns:
- returns server's port number
getUin
public synchronized int getUin()
- gets uin
- Returns:
- user identification number
notifyMessageReceived
protected void notifyMessageReceived(String message)
- fires event if listener is registered and message is received, connection succeeded or connection was broken
- Parameters:
- message - event ID
removeMessageEventListener
public synchronized void removeMessageEventListener(MessageEventListener listener)
- removes listener
- Parameters:
- listener - - message event listener to remove
sendMessage
public synchronized void sendMessage(int duin,
String data)
- sends message (puts message into sendingList)
- Parameters:
- duin - destination user uin
- data - message text (no longer 512 chars, or end will be cut)
setPassword
public synchronized void setPassword(String password)
- sets password
param password new user password, used at login time
setPort
public synchronized void setPort(int b)
- sets port. By default will use port number 4000
- Parameters:
- b - port number
setTargetHost
public synchronized void setTargetHost(InetAddress a)
- sets target host address. By default icq will use www.mirabilis.icq.com (NOT RECOMMENDED TO CHANGE !)
- Parameters:
- a - new server address
setUin
public synchronized void setUin(int uin)
- sets user's uin
- Parameters:
- uin - user identification number
startEngine
public synchronized void startEngine()
- starts icq 'kernel' process, which connects to server and is responsible for communication
stopEngine
public synchronized void stopEngine()
- properly breaks communication with server
takeMessages
public synchronized Icq.Message[] takeMessages()
- Returns:
- returns all received messages
takeStatus
public synchronized int takeStatus()
- Returns:
- connection status
All Packages Class Hierarchy This Package Previous Next Index