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

Constructor Index

 o Icq.IcqBean()
is used by visual builders
 o Icq.IcqBean(String, int)
constructor, which initializes password and uin too

Method Index

 o addMessageEventListener(MessageEventListener)
adds the specified message event listener to recieve message events from this ICQcomponent.
 o deleteMessage(Message)
deletes message from receivedList
 o getPassword()
 o getPort()
 o getUin()
gets uin
 o notifyMessageReceived(String)
fires event if listener is registered and message is received, connection succeeded or connection was broken
 o removeMessageEventListener(MessageEventListener)
removes listener
 o sendMessage(int, String)
sends message (puts message into sendingList)
 o setPassword(String)
sets password param password new user password, used at login time
 o setPort(int)
sets port.
 o setTargetHost(InetAddress)
sets target host address.
 o setUin(int)
sets user's uin
 o startEngine()
starts icq 'kernel' process, which connects to server and is responsible for communication
 o stopEngine()
properly breaks communication with server
 o takeMessages()
 o takeStatus()

Constructors

 o IcqBean
public IcqBean()
is used by visual builders

 o 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

Methods

 o 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
 o deleteMessage
public synchronized void deleteMessage(Message m)
deletes message from receivedList

Parameters:
m - message, which mus be removed from receivedList
 o getPassword
public synchronized java.lang.String getPassword()
Returns:
user password
 o getPort
public synchronized int getPort()
Returns:
returns server's port number
 o getUin
public synchronized int getUin()
gets uin

Returns:
user identification number
 o 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
 o removeMessageEventListener
public synchronized void removeMessageEventListener(MessageEventListener listener)
removes listener

Parameters:
listener - - message event listener to remove
 o 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)
 o setPassword
public synchronized void setPassword(String password)
sets password param password new user password, used at login time

 o setPort
public synchronized void setPort(int b)
sets port. By default will use port number 4000

Parameters:
b - port number
 o 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
 o setUin
public synchronized void setUin(int uin)
sets user's uin

Parameters:
uin - user identification number
 o startEngine
public synchronized void startEngine()
starts icq 'kernel' process, which connects to server and is responsible for communication

 o stopEngine
public synchronized void stopEngine()
properly breaks communication with server

 o takeMessages
public synchronized Icq.Message[] takeMessages()
Returns:
returns all received messages
 o takeStatus
public synchronized int takeStatus()
Returns:
connection status

All Packages  Class Hierarchy  This Package  Previous  Next  Index