Commit ff3733c7 authored by Dele Olajide's avatar Dele Olajide Committed by dele

Rayo plugin - Fix compilation fault

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13837 b35dd754-fafc-0310-a699-88a17e54d16e
parent 38757e19
package org.ifsoft.websockets;
import org.jivesoftware.openfire.StreamID;
public class BasicStreamID implements StreamID {
String id;
public BasicStreamID(String id) {
this.id = id;
}
public String getID() {
return id;
}
public String toString() {
return id;
}
public int hashCode() {
return id.hashCode();
}
}
package org.ifsoft.websockets;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.security.cert.Certificate;
import org.jivesoftware.openfire.SessionPacketRouter;
import org.jivesoftware.openfire.auth.UnauthorizedException;
import org.jivesoftware.openfire.net.VirtualConnection;
import org.jivesoftware.openfire.session.LocalClientSession;
import org.xmpp.packet.Packet;
public class WSConnection extends VirtualConnection
{
private static Logger Log = LoggerFactory.getLogger( "WSConnection" );
private SessionPacketRouter router;
private String remoteAddr;
private String hostName;
private LocalClientSession session;
private XMPPServlet.XMPPWebSocket socket;
public WSConnection( String remoteAddr, String hostName ) {
this.remoteAddr = remoteAddr;
this.hostName = hostName;
}
public void setSocket( XMPPServlet.XMPPWebSocket socket ) {
this.socket = socket;
}
public SessionPacketRouter getRouter()
{
return router;
}
public void setRouter(SessionPacketRouter router)
{
this.router = router;
}
public void closeVirtualConnection()
{
Log.debug("WSConnection - close ");
this.socket.disconnect();
}
public byte[] getAddress() {
return remoteAddr.getBytes();
}
public String getHostAddress() {
return remoteAddr;
// return wsSocket.getHostAddress();
}
public String getHostName() {
return ( hostName != null ) ? hostName : "0.0.0.0";
// return ( wsSocket.getHostName() == null ) ? wsSocket.getHostName() : "0.0.0.0";
}
public void systemShutdown() {
}
public void deliver(Packet packet) throws UnauthorizedException
{
deliverRawText(packet.toXML());
}
public void deliverRawText(String text)
{
this.socket.deliver(text);
}
public Certificate[] getPeerCertificates() {
return null;
}
}
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