|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.ou.kmi.buddyspace.core.BSConnectionBean
BSConnectionBean
is the main bean for BuddySpaceBeans.
A BSConnectionBean
mantains connection to a jabber server.
All the other beans are dependent on this and has to be reset
(typically using bean.setConnection
function) after a new connection
is setablished (BSConnectionBean.connect
function).
The class is based on ConnectionBean
and implements
ConnectionListener
from JabberBeans
.
Method Summary | |
void |
addConnectionListener(ConnectionListener listener)
Adds ConnectionListener to listeners notified when
connection state changes. |
boolean |
connect(java.lang.String hostName)
Creates new connection to the specified hostName |
boolean |
connect(java.lang.String hostName,
boolean useSSL)
Creates new connection to the specified hostName |
boolean |
connect(java.lang.String hostName,
int port)
Creates new connection to the specified hostName |
boolean |
connect(java.lang.String hostName,
int port,
boolean useSSL)
Creates new connection to the specified hostName |
void |
connectionChanged(ConnectionEvent ce)
Handles changes of connection state. |
void |
disconnect()
Closes current connection |
ConnectionBean |
getConnection()
Returns current ConnectionBean . |
ConnectionEvent.EState |
getConnectionState()
Returns current connection state |
ConnectionEvent.EState |
getState()
Returns current connection state. |
protected void |
prepareToDestroy()
Frees all object bindings to allow object destroy |
void |
receivedPacket(PacketEvent pe)
PacketListener method |
void |
removeAllConnectionListeners()
Removes all listeners notified when connection state changes. |
void |
removeConnectionListener(ConnectionListener listener)
Removes ConnectionListener from listeners notified when
connection state changes. |
void |
sendFailed(PacketEvent pe)
PacketListener method |
void |
sentPacket(PacketEvent pe)
PacketListener method |
protected void |
setConnectionState(ConnectionEvent.EState state)
Sets that connection state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public ConnectionEvent.EState getConnectionState()
public boolean connect(java.lang.String hostName, int port, boolean useSSL)
hostName
- Returns:
false
if the connection cannot be established
public boolean connect(java.lang.String hostName, int port)
hostName
- Returns:
false
if the connection cannot be established
public boolean connect(java.lang.String hostName)
hostName
- Returns:
false
if the connection cannot be established
public boolean connect(java.lang.String hostName, boolean useSSL)
hostName
- Returns:
false
if the connection cannot be established
public void disconnect()
protected void setConnectionState(ConnectionEvent.EState state)
protected void prepareToDestroy()
public void connectionChanged(ConnectionEvent ce)
public void addConnectionListener(ConnectionListener listener)
ConnectionListener
to listeners notified when
connection state changes.
removeConnectionListener(ConnectionListener)
,
removeAllConnectionListeners()
,
#notifyConnectionListeners
public void removeConnectionListener(ConnectionListener listener)
ConnectionListener
from listeners notified when
connection state changes.
addConnectionListener(ConnectionListener)
,
removeAllConnectionListeners()
,
#notifyConnectionListeners
public void removeAllConnectionListeners()
addConnectionListener(ConnectionListener)
,
removeConnectionListener(ConnectionListener)
,
#notifyConnectionListeners
public ConnectionEvent.EState getState()
public ConnectionBean getConnection()
ConnectionBean
.
Which is typically used for initialization of other beans.
public void receivedPacket(PacketEvent pe)
public void sendFailed(PacketEvent pe)
public void sentPacket(PacketEvent pe)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |