Commit 20ffb1c4 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Renamed the class.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@8552 b35dd754-fafc-0310-a699-88a17e54d16e
parent 4db34ec9
......@@ -36,16 +36,12 @@ import java.util.Set;
*
* @author Gaston Dombiak
*/
public class RemoteDirectedPresence implements Externalizable {
public class DirectedPresence implements Externalizable {
/**
* ID of the node that received the request to send a directed presence. This is the
* node ID that hosts the sender.
*/
private byte[] nodeID;
/**
* Full JID of the sender of the directed presence
*/
private String sender;
/**
* Full JID of the entity that received the directed presence.
* E.g.: paul@js.com/Spark or conference.js.com
......@@ -57,11 +53,10 @@ public class RemoteDirectedPresence implements Externalizable {
*/
private Set<String> receivers = new HashSet<String>();
public RemoteDirectedPresence() {
public DirectedPresence() {
}
public RemoteDirectedPresence(String sender, JID handlerJID) {
this.sender = sender;
public DirectedPresence(JID handlerJID) {
this.handler = handlerJID;
this.nodeID = XMPPServer.getInstance().getNodeID();
}
......@@ -70,10 +65,6 @@ public class RemoteDirectedPresence implements Externalizable {
return nodeID;
}
public String getSender() {
return sender;
}
public JID getHandler() {
return handler;
}
......@@ -96,14 +87,12 @@ public class RemoteDirectedPresence implements Externalizable {
public void writeExternal(ObjectOutput out) throws IOException {
ExternalizableUtil.getInstance().writeByteArray(out, nodeID);
ExternalizableUtil.getInstance().writeSafeUTF(out, sender);
ExternalizableUtil.getInstance().writeSafeUTF(out, handler.toString());
ExternalizableUtil.getInstance().writeStrings(out, receivers);
}
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
nodeID = ExternalizableUtil.getInstance().readByteArray(in);
sender = ExternalizableUtil.getInstance().readSafeUTF(in);
handler = new JID(ExternalizableUtil.getInstance().readSafeUTF(in));
ExternalizableUtil.getInstance().readStrings(in, receivers);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment