Adjusted ContactsRequest

This commit is contained in:
DieGurke 2020-02-09 23:58:09 +01:00
parent e443c9149a
commit a767f10ac9

View File

@ -1,5 +1,7 @@
package envoy.event;
import envoy.data.User;
/**
* Project: <strong>envoy-common</strong><br>
* File: <strong>ContactsRequest.java</strong><br>
@ -11,6 +13,7 @@ package envoy.event;
public class ContactsRequest implements Event<String> {
private final String request;
private final User client;
private static final long serialVersionUID = -7969312055630533627L;
@ -21,7 +24,10 @@ public class ContactsRequest implements Event<String> {
* corresponding clients as contacts from the server.
* @since Envoy Common v0.2-alpha
*/
public ContactsRequest(String request) { this.request = request; }
public ContactsRequest(String request, User client) {
this.request = request;
this.client = client;
}
/**
* @return the request string
@ -29,4 +35,9 @@ public class ContactsRequest implements Event<String> {
*/
@Override
public String get() { return request; }
/**
* @return returns the client, which sent this request
*/
public User getClient() { return client; }
}