1 11 12 package org.jivesoftware.messenger; 13 14 import org.xmpp.packet.Packet; 15 import org.jivesoftware.messenger.auth.UnauthorizedException; 16 17 import java.net.InetAddress ; 18 import java.net.UnknownHostException ; 19 import java.io.Writer ; 20 21 26 public interface Connection { 27 28 34 public boolean validate(); 35 36 43 public void init(Session session); 44 45 50 public InetAddress getInetAddress() throws UnknownHostException ; 51 52 67 public Writer getWriter(); 68 69 78 public void close(); 79 80 85 public boolean isClosed(); 86 87 92 public boolean isSecure(); 93 94 107 public Object registerCloseListener(ConnectionCloseListener listener, Object handbackMessage); 108 109 119 public Object removeCloseListener(ConnectionCloseListener listener); 120 121 127 public void deliver(Packet packet) throws UnauthorizedException; 128 129 140 public void deliverRawText(String text); 141 142 150 public boolean isFlashClient(); 151 152 160 public int getMajorXMPPVersion(); 161 162 170 public int getMinorXMPPVersion(); 171 172 178 public String getLanguage(); 179 } 180 | Popular Tags |