public class TennisBall extends Object
Constructor and Description |
---|
TennisBall(int ttl)
Creates a new ball with the specified TTL (Time To Live) value.
|
Modifier and Type | Method and Description |
---|---|
int |
getTTL()
Returns the TTL value of this ball.
|
TennisBall |
stroke()
Returns the ball after
TennisPlayer 's stroke. |
String |
toString()
Returns string representation of this message (
[PING|PONG]
(TTL) ). |
public TennisBall(int ttl)
public int getTTL()
public TennisBall stroke()
TennisPlayer
's stroke.
The returned ball has decreased TTL value and switched PING/PONG state.Copyright © 2004–2014 Apache MINA Project. All rights reserved.