com.starlight.intrepid.message.PingIMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of intrepid Show documentation
Show all versions of intrepid Show documentation
A replacement for Java RMI (Remote Method Invocation) that allows for simpler and more transparent usage with more flexible control over session and security.
package com.starlight.intrepid.message;
/**
*
*/
public class PingIMessage implements IMessage {
private final short sequence_number;
public PingIMessage( short sequence_number ) {
this.sequence_number = sequence_number;
}
@Override
public IMessageType getType() {
return IMessageType.PING;
}
public short getSequenceNumber() {
return sequence_number;
}
@Override
public boolean equals( Object o ) {
if ( this == o ) return true;
if ( o == null || getClass() != o.getClass() ) return false;
PingIMessage that = ( PingIMessage ) o;
return sequence_number == that.sequence_number;
}
@Override
public int hashCode() {
return ( int ) sequence_number;
}
}