@SuppressWarnings("deprecation")
public Service(ServiceArgs args) {
super();
this.app = Args.<String>get(args, "app", args.app != null ? args.app : null);
this.host = Args.<String>get(args, "host", args.host != null ? args.host : DEFAULT_HOST);
this.owner = Args.<String>get(args, "owner", args.owner != null ? args.owner : null);
this.port = Args.<Integer>get(args, "port", args.port != null ? args.port : DEFAULT_PORT);
this.scheme = Args.<String>get(args, "scheme", args.scheme != null ? args.scheme : DEFAULT_SCHEME);
this.token = Args.<String>get(args, "token", args.token != null ? args.token : null);
this.username = (String)args.get("username");
this.password = (String)args.get("password");
this.httpsHandler = Args.<URLStreamHandler>get(args, "httpsHandler", null);
this.setSslSecurityProtocol(Args.get(args, "SSLSecurityProtocol", Service.getSslSecurityProtocol()));
this.addCookie((String)args.get("cookie"));
}