|
Wildfire 3.1.1 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jivesoftware.wildfire.net.VirtualConnection
public abstract class VirtualConnection
Abstract implementation of the Connection interface that models abstract connections. Abstract connections are connections that don't have a physical connection counterpart. Instead they can be seen as conceptual or just 'abstract' connections.
Default values and common behavior of virtual connections are modeled in this class. Subclasses should just need to specify how packets are delivered and what means closing the connection.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jivesoftware.wildfire.Connection |
|---|
Connection.CompressionPolicy, Connection.TLSPolicy |
| Field Summary | |
|---|---|
protected Session |
session
|
| Constructor Summary | |
|---|---|
VirtualConnection()
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the session, the virtual connection and notifies listeners that the connection has been closed. |
abstract void |
closeVirtualConnection()
Closes the virtual connection. |
Connection.CompressionPolicy |
getCompressionPolicy()
Returns whether compression is optional or is disabled. |
String |
getLanguage()
Returns the language code that should be used for this connection (e.g. |
int |
getMajorXMPPVersion()
Returns the major version of XMPP being used by this connection (major_version.minor_version. |
int |
getMinorXMPPVersion()
Returns the minor version of XMPP being used by this connection (major_version.minor_version. |
Connection.TLSPolicy |
getTlsPolicy()
Returns whether TLS is mandatory, optional or is disabled. |
void |
init(Session session)
Initializes the connection with it's owning session. |
boolean |
isClosed()
Returns true if the connection/session is closed. |
boolean |
isCompressed()
Returns true if the connection is using compression. |
boolean |
isFlashClient()
Returns true if the connected client is a flash client. |
boolean |
isSecure()
Returns true if this connection is secure. |
Object |
registerCloseListener(ConnectionCloseListener listener,
Object handbackMessage)
Registers a listener for close event notification. |
Object |
removeCloseListener(ConnectionCloseListener listener)
Removes a registered close event listener. |
boolean |
validate()
Verifies that the connection is still live. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jivesoftware.wildfire.Connection |
|---|
deliver, deliverRawText, getInetAddress, systemShutdown |
| Field Detail |
|---|
protected Session session
| Constructor Detail |
|---|
public VirtualConnection()
| Method Detail |
|---|
public String getLanguage()
Connection
getLanguage in interface Connectionpublic int getMajorXMPPVersion()
Connection
getMajorXMPPVersion in interface Connectionpublic int getMinorXMPPVersion()
Connection
getMinorXMPPVersion in interface Connectionpublic boolean isClosed()
Connection
isClosed in interface Connectionpublic Connection.CompressionPolicy getCompressionPolicy()
Connection
getCompressionPolicy in interface Connectionpublic Connection.TLSPolicy getTlsPolicy()
Connection
getTlsPolicy in interface Connectionpublic boolean isCompressed()
Connection
isCompressed in interface Connectionpublic boolean isFlashClient()
Connection
isFlashClient in interface Connectionpublic boolean isSecure()
Connection
isSecure in interface Connectionpublic boolean validate()
Connection
validate in interface Connectionpublic void init(Session session)
Connection
init in interface Connectionsession - the session that owns this connectionpublic void close()
close in interface Connection
public Object registerCloseListener(ConnectionCloseListener listener,
Object handbackMessage)
Connection
registerCloseListener in interface Connectionlistener - the listener to register for events.handbackMessage - the object to send in the event notification.
public Object removeCloseListener(ConnectionCloseListener listener)
Connection
removeCloseListener in interface Connectionlistener - the listener to deregister for close events.
public abstract void closeVirtualConnection()
|
Wildfire 3.1.1 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||