2
* Copyright (C) 2009 by Eric Lambert <Eric.Lambert@sun.com>
3
* Use and distribution licensed under the
4
* GNU Lesser General Public License (LGPL) version 2.1.
5
* See the COPYING file in the parent directory for full text.
7
package org.gearman.common;
10
* A <tt>GearmanJobEvent</tt> represents an event that occurs in either
11
* the submission of job or the execution of a job.
14
public interface GearmanPacket {
16
public static enum DataComponentName {
39
* Retrieves the event type for this event.
43
public PacketType getPacketType();
45
public byte [] toBytes();
48
* Retrieves the payload, if any, associated with this event.
52
public byte [] getData();
54
public byte [] getDataComponentValue( DataComponentName component);
56
public PacketMagic getMagic();
58
public boolean requiresResponse();