package org.jboss.mq.il.uil2.msgs;
import java.io.ObjectInputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
public class PingMsg extends BaseMsg
{
private long time;
public PingMsg(boolean isPing)
{
this(0, isPing);
}
public PingMsg(long time, boolean isPing)
{
super(isPing ? MsgTypes.m_ping : MsgTypes.m_pong);
this.time = time;
}
public long getTime()
{
return time;
}
public void write(ObjectOutputStream out) throws IOException
{
super.write(out);
out.writeLong(time);
}
public void read(ObjectInputStream in) throws IOException, ClassNotFoundException
{
super.read(in);
time = in.readLong();
}
}