|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
edu.nps.moves.disutil.UdpServer.Event
public static class UdpServer.Event
An event representing activity by a UdpServer
.
This code is released into the Public Domain. Since this is Public Domain, you don't need to worry about licensing, and you can simply copy this UdpServer.java file to your own package and use it as you like. Enjoy. Please consider leaving the following statement here in this code:
This UdpServer class was copied to this project from its source as found at iHarder.net.
UdpServer
,
UdpServer.Adapter
,
UdpServer.Listener
,
Serialized FormField Summary |
---|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
UdpServer.Event(UdpServer src)
Creates a Event based on the given UdpServer . |
Method Summary | |
---|---|
java.net.DatagramPacket |
getPacket()
Returns the most recent datagram packet received by the UdpServer . |
byte[] |
getPacketAsBytes()
Copies and returns the bytes in the most recently received packet, or null if not available. |
java.lang.String |
getPacketAsString()
Returns the data in the most recently-received packet as if it were a String or null if not available. |
UdpServer.State |
getState()
Shorthand for getUdpServer().getState(). |
UdpServer |
getUdpServer()
Returns the source of the event, a UdpServer . |
Methods inherited from class java.util.EventObject |
---|
getSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UdpServer.Event(UdpServer src)
UdpServer
.
src
- the source of the eventMethod Detail |
---|
public UdpServer getUdpServer()
UdpServer
.
Shorthand for (UdpServer)getSource().
public UdpServer.State getState()
UdpServer.State
public java.net.DatagramPacket getPacket()
UdpServer
. Shorthand for
getUdpServer().getPacket().
public byte[] getPacketAsBytes()
public java.lang.String getPacketAsString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |