Advertisement
Guest User

Untitled

a guest
Jul 18th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.36 KB | None | 0 0
  1. object Service {
  2.     def apply(username:String, server:String, password:String)
  3.     {
  4.         val x = new XMPPConnection(server);
  5.         x.login(username, password);
  6.         new Service(x);
  7.     }
  8.    
  9.     def apply(jid:String, password:String)
  10.     {
  11.         val (user :: server :: _) = jid.split("@").toList
  12.         this(user, server, password)
  13.     }            
  14. }
  15.  
  16. class Service(connection:XMPPConnection)
  17. {
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement