@Override
 public XmppTransport build() {
   if (singleton == null) {
     singleton = new XmppService();
     singleton.doesShortcut = XmppTransportConfig.decorate(getParams()).getDoShortcut();
   }
   return singleton.get(getParams(), getHandle());
 }
Beispiel #2
0
 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");
   }
 }
Beispiel #3
0
  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");
    }
  }