input
stringlengths
10
828
output
stringlengths
5
107
public int get buffer size return 0 todo change
returns the actual buffer size used for the response
private tab itself find tab contact cw find class find class new find class tabbed pane cw guiutils run on awtand wait find class return find class tab
locate the tab via the contact
public int get interface index return interface index
default interface index
public group list get group list return group list
returns the reference to main static list
public void set group list group list group list this group list group list
used to assign stored list
public status create status return new contact status this
this way one can overwrite it
public string get display name return preferences is use display name preferences get display name display name
name that should be displayed everywhere where nice print is needed
public void set display name string display name it s ok to just set it get display name doesn t use it straight this display name display name if preferences is use display name no point wasting cycles if we are not using it update display component
name that should be displayed
public void update display component if main get people panel null main get people panel update update display component
resets displays properties
public boolean equals object obj if this obj return true if obj instanceof nameable return false nameable other nameable obj if get name equals other get name return false if obj instanceof contact wrapper return true can t compare any more and name matched return get connection equals contact wrapper other get connection
indicates whether some other object is equal to this one
public boolean is fold return fold
determines if the contacts will be displayed in the list
public void set fold boolean fold this fold fold
determines if the contacts will be displayed in the list
public void service http servlet request req http servlet response res throws servlet exception ioexception http session session req get session false if session null session invalidate new login servlet service req res
services a single http request from the client
public void picture received icon support connection contact contact
a previously requested icon has arrived
public void connection initiated connection connection main get status bar set visible true connections in progress
sent before connection is attempted
public void connection failed final connection connection final string message log info connection to connection get service name as connection get user failed message connection get disconnect count time s connection done handle disconnect connection reconnect connection message
connection failed on login
private void handle disconnect connection connection run through the groups and kill all contacts which belong to this connection for int i 0 i connection get group list size i group group connection get group list get i for int j 0 j group size j nameable contact group get j if contact instanceof contact contact cw contact contact if connection cw get connection cw get status set online false main get people panel update handle disconnect
call this method after you disconnect
public void error occured string message exception exception main complain message exception
gets called when an assynchronous error occurs
public void mark clock system current time millis make sure it d n start w o us running first code lock lock make sure we don t run lock from multiple callers try if run this first null flag is value run start each mark run this first run run this first null done flag set value true clock system current time millis synchronized notify object wake it up notify object notify finally lock unlock thread yield
starts the delayed processing request
public void stop processing internal check false lock lock try synchronized notify object wake it up notify object notify finally lock unlock
kills the thread
public runnable get run this first return run this first
someone may want it back
public runnable get run this last return run this last
someone may want it back
public void start monitoring monitored item monitored item monitored item fail false reset that flag safety set if monitored contains monitored item monitored add monitored item synchronized monitored monitored notify all
add an item to be monitored
public void stop monitoring monitored item monitored item monitored remove monitored item
remove an item from beeing monitored
public void stop heartbeat shut down true monitored notify all
stop entire monitoring process
public object clone status impl new status new status impl parent new status online online new status away away new status wireless wireless new status idle time idle time return new status
deel copy of the object but shallow copy of the parent
public boolean is use alert return use alert
allows the use of alerts
public boolean is statusbar always visible return statusbar always visible
determines if the status bar should never be hidden
public void add contact final nameable contact final com itbs aimcer bean group group try connection add buddy contact get name group get name catch ioexception e notify error occured failed to add buddy e add contact
call to add a new contact to your list
public boolean remove contact final nameable contact group group boolean result false if group null group find group via buddy contact if group null try result connection remove buddy contact get name group get name catch ioexception e notify error occured error while removing contact e clean group group contact return result remove contact
call to remove a contact you no longer want
public int get display buffer return display buffer
display buffer size
public void set display buffer int display buffer if display buffer 0 display buffer 1 if display buffer 10 display buffer 10 this display buffer display buffer
display buffer size
public void clear picture
will remove the picture
public void upload picture final file picture upload picture
use this picture for me
public void received url user info from int uin string url string description boolean massmessage incoming icq from uin 0 description
apparently icq can send urls
public void received contacts user info from int uin map contact boolean massmessage incoming icq from uin 0 contact to string massmessage todo figure this out if anyone cares
icq can send contact info back and forth
public string get forwardee return forwardee
for forwarding messages
public void set forwardee string forwardee this forwardee forwardee
for forwarding messages
public void add contact nameable contact group group session send flap new add to contact list new string contact get name group add contact
only use when adding new buddies
public boolean is login info good string name string pass return false
allows one to check credentials withoout looking in
public void connect throws security exception exception super connect notify connection initiated new thread public void run connect real start
non blocking call
public group list get group list return get group factory get group list
accessor for compatibility
public void move contact nameable contact group group if is logged in remove contact contact null add contact contact group
moves contact from one group to another
public void move contact nameable contact group old group group new group if is logged in remove contact contact old group add contact contact new group
moves contact from one group to another
protected void notify connection initiated iterator connection event listener iter get event listener iterator while iter has next iter next connection initiated this
tells everyone connection was initiated
public void notify connection established connection valid true iterator connection event listener iter get event listener iterator while iter has next iter next connection established this
tells everyone connection was established
public void notify status changed iterator connection event listener iter get event listener iterator while iter has next try iter next status changed this catch exception e notify error occured failure while processing events e
tells everyone someones status changed
public void notify status changed contact contact status old status iterator connection event listener iter get event listener iterator while iter has next try iter next status changed this contact old status catch exception e notify error occured failure while processing events e
tells everyone someones status changed
public void notify email received message message connection valid true iterator connection event listener iter get event listener iterator while iter has next try iter next email received message support this message catch exception e logger log level severe failed to notify e notify error occured failed to notify e
notifies of an email received
public void notify connection lost iterator connection event listener iter get event listener iterator while iter has next try iter next connection lost this catch exception e logger log level severe should not be failing on logout e
tells everyone connection was lost
public void notify connection failed string message iterator connection event listener iter get event listener iterator while iter has next try iter next connection failed this message catch exception e logger log level severe failure while notifying listeners of connection failure e
tells everyone connection was lost
public void notify error occured string message exception exception message get service name get user message iterator connection event listener iter get event listener iterator while iter has next try iter next error occured message exception catch exception e logger log level severe failure while notifying listeners of connection failure e
tells everyone connection was lost
public void set server port int port server port port
messaging server port
public void connect throws exception set user name get user name update user variable not same as username as it is a user object
most of the time one would overwrite it
public boolean is login info good string name string pass return name null pass null name equals ignore case get user name pass equals get password
allows one to check credentials withoout looking in
public void set away boolean away this away away notify all of a status change for connection event listener connection event listener event handlers try connection event listener status changed this catch exception e log log level severe failed to set away e shhh keep this quiet for now no biggie
notifies everyone that status has been updated
public string get service name return msn
returns a short name for the service
protected void clean group group group nameable contact if group null group remove contact else group list list get group list for int i list size i 0 i if list get i remove contact break
will try to delete contact from group
protected group find group via buddy com itbs aimcer bean nameable contact group list list get group list for int i list size i 0 i group group list get i for int j group size j 0 j if group get j get name equals ignore case contact get name return group return null
finds a group
public void set away boolean away if connection null try connection set my status away user status away from computer user status online catch ioexception e log log level severe failed to set status e super set away away
sets the away flag
protected void process secure message message message throws ioexception process message message todo go secure at some point
overide this message with code that sends the message out
public string get service name return ssl jabber
returns a short name for the service
public void set user name string user name int index user name null 1 user name index of super set user name index 1 user name user name substring 0 index super set user name user name
previously removed the
protected string fix user name string name if name null name index of 1 return name return name gmail com
used to fix the usernames for the jabber protocol
public void initiate file transfer file transfer listener ftl throws ioexception switchboard session session get session ftl get contact name if session null try connection send file request get user name ftl get file session catch ioexception e ftl notify fail
starts a file transfer
protected void process smack packet packet packet boolean has content if packet instanceof org jivesoftware smack packet message org jivesoftware smack packet message smack message org jivesoftware smack packet message packet has content smack message get body length 0 else has content string packet get property body length 0 if has content super process smack packet packet
just calls the parent if theres content to the message
public string get service name return google talk
returns a short name for the service
public void accept file transfer file transfer listener ftl object connection info todo verify if connection info instanceof volatile downloader connection fire file receive started event volatile downloader connection info else log fine msnconnection accept file transfer not the right class connection info get class get name
sets up file for receival
public void set encoding string encoding if encoding null throw new null pointer exception encoding should never be null this encoding encoding
defines encoding used by the connection
public void reject file transfer todo change
request to cancel the file transfer in progress
public string get encoding return shift jis return utf 16 return encoding
defines encoding used by the connection
public void add contact nameable contact group group if session null do it for the server try session send new friend request contact get name group get name yahoo protocol yahoo session send new friend request contact get name group get name yahoo protocol msn group add contact why was this done causes contacts to appear online when they are not testing maybe if contact instanceof contact contact contact get status set online true catch ioexception e for connection event listener event handler event handlers event handler error occured failed to add your contact e
only use when adding new buddies
public void add contact nameable contact group group if session null do it for the server try session add friend contact get name group get name group add contact why was this done causes contacts to appear online when they are not testing maybe if contact instanceof contact contact contact get status set online true catch ioexception e for connection event listener event handler event handlers event handler error occured failed to add your contact e
only use when adding new buddies
public string get service name return nate com
returns a short name for the service
public void set away boolean away connection set my status away get properties get iam away message super set away away
sets the away flag
public boolean remove contact nameable contact group group if session null if group null group find group via buddy contact if group null try session remove friend from group contact get name group get name clean group group contact catch ioexception e notify error occured failed to delete e return false return true
use to remove contacts
protected void process message message message throws ioexception nate friend owner connection get owner instance message msg new instance message owner get nate id message get contact get name message get text connection send imessage msg connection send message message get contact get name message get text this is old bad method
overide this message with code that sends the message out
public boolean remove contact nameable contact group group if session null if group null group find group via buddy contact if group null try session remove friend contact get name group get name clean group group contact catch ioexception e log log level severe e todo change return false return true
use to remove contacts
public void reconnecting in int seconds todo change
the connection will retry to reconnect in the specified number of seconds
public void accept file transfer file transfer listener ftl object connection info file recver file recver file recver connection info file recver start
sets up file for receival
public void reject file transfer object connection info file recver file recver file recver connection info file recver stop file transfer
request to cancel the file transfer in progress
public void reconnection successful notify connection established
the connection has reconnected successfully to the server
public void add contact nameable contact group group do it for the server connection add buddy contact get name group get name group add contact
only use when adding new buddies
public void reconnection failed exception e notify connection lost
an attempt to connect to the server has failed
public boolean remove contact nameable contact group group do it for the server connection unwatch buddy contact get name clean group group contact return true
use to remove contacts
public boolean is system message nameable contact return aolsystemmsg equals general utils get simplified name contact get name
true if this is a system message
public void connect throws exception super connect notify connection initiated new thread public void run connect real start
non blocking call
public void initiate file transfer file transfer listener ftl throws ioexception if session null session send file transfer ftl get contact name ftl get file ftl get file description
starts a file transfer
public void accept file transfer file transfer listener ftl object connection info if session null try session save file transfer as session file transfer event connection info ftl get file get absolute path catch ioexception e for connection event listener event handler event handlers event handler error occured error while transferring file e get message e
sets up file for receival
protected string fix user name string name if name index of 1 return name return name get server name return name
used to fix the usernames for the jabber protocol
public void reject file transfer object connection info
request to cancel the file transfer in progress
public void initiate file transfer file transfer listener ftl throws ioexception if session null session send file transfer ftl get contact name ftl get file get absolute path ftl get file description
starts a file transfer
public string get service name return twitter
returns a short name for the service
public void accept file transfer file transfer listener ftl object connection info if session null try session save file transfer as session file transfer event connection info ftl get file get absolute path catch ioexception e for connection event listener event handler event handlers event handler error occured error while transfering file e get message e
sets up file for receival
public void set away boolean away
sets the away flag
protected void process message message message throws ioexception try connection send direct message message get contact get name message get plain text catch twitter exception e log log level severe e throw new ioexception e get message
overide this message with code that sends the message out
protected void process secure message message message throws ioexception process message message
overide this message with code that sends the message out
protected string fix user name string name if name index of 1 return name return name get server name
used to fix the usernames for the jabber protocol
public void action fail synchronized monitored item monitored item notify all unlock failures if failures max failures disconnect false else log info failure failures let it slide get user name action fail
called what to do if item has failed
public string get service name return jabber
returns a short name for the service