Commit 56bc6f6f authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Refactoring work.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3837 b35dd754-fafc-0310-a699-88a17e54d16e
parent 21e8db34
...@@ -14,7 +14,6 @@ package org.jivesoftware.wildfire; ...@@ -14,7 +14,6 @@ package org.jivesoftware.wildfire;
import org.jivesoftware.wildfire.auth.UnauthorizedException; import org.jivesoftware.wildfire.auth.UnauthorizedException;
import org.xmpp.packet.Packet; import org.xmpp.packet.Packet;
import java.io.Writer;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.UnknownHostException; import java.net.UnknownHostException;
...@@ -49,30 +48,6 @@ public interface Connection { ...@@ -49,30 +48,6 @@ public interface Connection {
*/ */
public InetAddress getInetAddress() throws UnknownHostException; public InetAddress getInetAddress() throws UnknownHostException;
/**
* Returns the port that the connection uses.
*
* @return the port that the connection uses.
*/
public int getPort();
/**
* Returns the Writer used to send data to the connection. The writer should be
* used with caution. In the majority of cases, the {@link #deliver(Packet)}
* method should be used to send data instead of using the writer directly.
* You must synchronize on the writer before writing data to it to ensure
* data consistency:
*
* <pre>
* Writer writer = connection.getWriter();
* synchronized(writer) {
* // write data....
* }</pre>
*
* @return the Writer for this connection.
*/
public Writer getWriter();
/** /**
* Close this session including associated socket connection. The order of * Close this session including associated socket connection. The order of
* events for closing the session is: * events for closing the session is:
...@@ -198,13 +173,6 @@ public interface Connection { ...@@ -198,13 +173,6 @@ public interface Connection {
*/ */
CompressionPolicy getCompressionPolicy(); CompressionPolicy getCompressionPolicy();
/**
* Sets whether compression is enabled or is disabled.
*
* @param compressionPolicy whether Compression is enabled or is disabled.
*/
void setCompressionPolicy(CompressionPolicy compressionPolicy);
/** /**
* Returns whether TLS is mandatory, optional or is disabled. When TLS is mandatory clients * Returns whether TLS is mandatory, optional or is disabled. When TLS is mandatory clients
* are required to secure their connections or otherwise their connections will be closed. * are required to secure their connections or otherwise their connections will be closed.
...@@ -216,37 +184,6 @@ public interface Connection { ...@@ -216,37 +184,6 @@ public interface Connection {
*/ */
TLSPolicy getTlsPolicy(); TLSPolicy getTlsPolicy();
/**
* Sets whether TLS is mandatory, optional or is disabled. When TLS is mandatory clients
* are required to secure their connections or otherwise their connections will be closed.
* On the other hand, when TLS is disabled clients are not allowed to secure their connections
* using TLS. Their connections will be closed if they try to secure the connection. in this
* last case.
*
* @param tlsPolicy whether TLS is mandatory, optional or is disabled.
*/
void setTlsPolicy(TLSPolicy tlsPolicy);
/**
* Returns the number of milliseconds a connection has to be idle to be closed. Sending
* stanzas to the client is not considered as activity. We are only considering the
* connection active when the client sends some data or hearbeats (i.e. whitespaces)
* to the server.
*
* @return the number of milliseconds a connection has to be idle to be closed.
*/
long getIdleTimeout();
/**
* Sets the number of milliseconds a connection has to be idle to be closed. Sending
* stanzas to the client is not considered as activity. We are only considering the
* connection active when the client sends some data or hearbeats (i.e. whitespaces)
* to the server.
*
* @param timeout the number of milliseconds a connection has to be idle to be closed.
*/
void setIdleTimeout(long timeout);
/** /**
* Enumeration of possible compression policies required to interact with the server. * Enumeration of possible compression policies required to interact with the server.
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment