Commit 17f199b4 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Some more code cleanup.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@4383 b35dd754-fafc-0310-a699-88a17e54d16e
parent 61a17711
......@@ -30,34 +30,34 @@ public abstract class AbstractGatewaySession implements GatewaySession, Endpoint
this.gateway = gateway;
this.subscription = info;
}
/**
* The gateway.
*/
protected transient Gateway gateway;
/**
* Has the client registered with the gateway?
*/
public boolean clientRegistered;
/**
* Has the server attempted to register with the client?
*/
public boolean serverRegistered;
/**
* The subscriptionInfo.
* @see org.jivesoftware.wildfire.gateway.SubscriptionInfo
*/
private final SubscriptionInfo subscription;
/**
* The jabber endpoint.
* @see org.jivesoftware.wildfire.gateway.Endpoint
*/
private Endpoint jabberEndpoint;
/**
* Set the Jabber <code>Endpoint</code>.
*
......@@ -66,17 +66,17 @@ public abstract class AbstractGatewaySession implements GatewaySession, Endpoint
public void setJabberEndpoint(Endpoint jabberEndpoint) {
this.jabberEndpoint = jabberEndpoint;
}
/**
* Return the jabber <code>Endpoint</code>.
* Return the Jabber <code>Endpoint</code>.
*
* @return endpoint The jabber endpoint.
* @return endpoint The Jabber endpoint.
* @see org.jivesoftware.wildfire.gateway.Endpoint
*/
public Endpoint getJabberEndpoint() {
return jabberEndpoint;
}
/**
* Return the legacy <code>Endpoint</code>.
*
......@@ -86,7 +86,7 @@ public abstract class AbstractGatewaySession implements GatewaySession, Endpoint
public Endpoint getLegacyEndpoint() {
return this;
}
/**
* Return the <code>SubscriptionInfo</code>
*
......@@ -97,7 +97,7 @@ public abstract class AbstractGatewaySession implements GatewaySession, Endpoint
public SubscriptionInfo getSubscriptionInfo() {
return this.subscription;
}
/**
* Return the gateway associated with this session.
*
......@@ -114,4 +114,5 @@ public abstract class AbstractGatewaySession implements GatewaySession, Endpoint
public EndpointValve getValve() {
return this.jabberEndpoint.getValve();
}
}
......@@ -21,7 +21,7 @@ import org.xmpp.packet.Packet;
* @version 1.0
*/
public interface Endpoint {
/**
* Send a packet to the underlying messaging services
*
......@@ -29,8 +29,7 @@ public interface Endpoint {
* @throws ComponentException
*/
public void sendPacket(Packet packet) throws ComponentException;
/**
* Return the <code>EndpointValve</code>. This provides the ability of the
* caller to open or close the valve to control the follow of packets to the
......@@ -39,4 +38,5 @@ public interface Endpoint {
* @return valve The <code>EndpointValve</code> associated with this <code>Endpoint</code>
*/
public EndpointValve getValve();
}
......@@ -34,20 +34,20 @@ public class JabberEndpoint implements Endpoint {
* @see ComponentManager
*/
private final ComponentManager componentManager;
/**
* The component
*
* @see Component
*/
private final Component component;
/**
* The value.
* @see EndpointValve
*/
private final EndpointValve valve;
/**
* Construct a new <code>JabberEndpoint</code>.
* @param componentManager The componentManager.
......@@ -56,7 +56,7 @@ public class JabberEndpoint implements Endpoint {
public JabberEndpoint(ComponentManager componentManager, Component component) {
this(componentManager, component, new EndpointValve());
}
/**
* Construct a new <code>JabberEndpoint</code>.
* @param componentManager
......@@ -68,19 +68,6 @@ public class JabberEndpoint implements Endpoint {
this.component = component;
this.valve= valve;
}
//
//
// /**
// * @param jid
// * @param string
// * @throws Exception
// */
// public void sendMessage(JID jid, String string) throws Exception {
// Message message = new Message();
// message.setBody(string);
// message.setTo(jid);
// this.componentManager.sendPacket(this.component, message);
// }
/**
* @see org.jivesoftware.wildfire.gateway.Endpoint#sendPacket(Packet)
......@@ -103,10 +90,9 @@ public class JabberEndpoint implements Endpoint {
/** The backlog queue. */
private final ConcurrentLinkedQueue<Packet> queue = new ConcurrentLinkedQueue<Packet>();
/** The logger. */
final static private Logger logger = Logger.getLogger("JabberEndpoint", "gateway_i18n");
/**
* @see org.jivesoftware.wildfire.gateway.Endpoint#getValve()
*/
......
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