@Override public XmppTransport build() { if (singleton == null) { singleton = new XmppService(); singleton.doesShortcut = XmppTransportConfig.decorate(getParams()).getDoShortcut(); } return singleton.get(getParams(), getHandle()); }
public void xmppDisconnect() throws Exception { AgentHost host = getAgentHost(); XmppService service = (XmppService) host.getTransportService("xmpp"); if (service != null) { service.disconnect(getId()); } else { throw new Exception("No XMPP service registered"); } }
public void xmppConnect(@Name("username") String username, @Name("password") String password) throws Exception { AgentHost host = getAgentHost(); XmppService service = (XmppService) host.getTransportService("xmpp"); if (service != null) { service.connect(getId(), username, password); } else { throw new Exception("No XMPP service registered"); } }