# Interface Event

All Superinterfaces:
  `Serializable`

All Known Implementing Classes:
  `DragEvent, FlickEvent, RelativeDragEvent, RotateEvent, SpinEvent, TouchEvent, ZoomEvent`

public interface Event extends Serializable
This interface must be implemented by all user-defined events.

Author:
  Jay Roltgen

## Method Summary

Modifier and Type
Method
Description
`int`
`getEventType()`
Returns the integer value of this event type.
`byte[]`
`serialize()`
Serializes this event for transmission over the network.

## Method Details

### getEventType

int getEventType()
Returns the integer value of this event type. Event type values are defined in the enumeration com.sparshui.common.messages.events.EventType.java

Returns:
  The event type

### serialize

byte[] serialize()
Serializes this event for transmission over the network. The user-defined event shall implement this method, as well as a constructor that takes the serialized byte array as an input argument. This method will serialize the event, and the constructor will "unserialize" it.

Returns:
  The serialized event, ready for transmission over the network.