public WebSocketImpl(WebSocketListener listener,List<Draft> drafts){
  this(listener,(Draft)null);
  this.role=Role.SERVER;
  if (drafts == null || drafts.isEmpty()) {
    knownDrafts=defaultdraftlist;
  }
 else {
    knownDrafts=drafts;
  }
}

public WebSocketImpl ( WebSocketListener listener , List < Draft > drafts ) { this ( listener , ( Draft ) null ) ; this . role = Role . SERVER ; if ( drafts == null || drafts . isEmpty ( ) ) { knownDrafts = defaultdraftlist ; } else { knownDrafts = drafts ; } }
crates a websocket with server role
