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