com.sun.sgs.app
Enum Delivery

java.lang.Object
  extended by java.lang.Enum<Delivery>
      extended by com.sun.sgs.app.Delivery
All Implemented Interfaces:
Serializable, Comparable<Delivery>

public enum Delivery
extends Enum<Delivery>

Representation for message delivery guarantees. A channel is created with a delivery guarantee. See the ChannelManager.createChannel method for details.

With all delivery guarantees, messages are guaranteed to be delivered at most once.


Enum Constant Summary
ORDERED_UNRELIABLE
          Ordered unreliable delivery: Message delivery is not guaranteed.
RELIABLE
          Reliable delivery: Message delivery is guaranteed unless there is a node or network failure.
UNORDERED_RELIABLE
          Unordered reliable delivery: Message delivery is guaranteed unless there is a node or network failure.
UNRELIABLE
          Unreliable delivery: Message delivery is not guaranteed.
 
Method Summary
 boolean supportsDelivery(Delivery delivery)
          Returns true if this delivery guarantee meets the minimum requirements of the specified delivery guarantee, otherwise returns false.
static Delivery valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Delivery[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNRELIABLE

public static final Delivery UNRELIABLE
Unreliable delivery: Message delivery is not guaranteed. No message order is preserved


ORDERED_UNRELIABLE

public static final Delivery ORDERED_UNRELIABLE
Ordered unreliable delivery: Message delivery is not guaranteed. Messages that are delivered preserve the sender's order.


UNORDERED_RELIABLE

public static final Delivery UNORDERED_RELIABLE
Unordered reliable delivery: Message delivery is guaranteed unless there is a node or network failure. No message order is preserved.


RELIABLE

public static final Delivery RELIABLE
Reliable delivery: Message delivery is guaranteed unless there is a node or network failure. Messages that are delivered preserve the sender's order.

Method Detail

values

public static Delivery[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Delivery c : Delivery.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Delivery valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

supportsDelivery

public boolean supportsDelivery(Delivery delivery)
Returns true if this delivery guarantee meets the minimum requirements of the specified delivery guarantee, otherwise returns false.

Parameters:
delivery - a delivery guarantee
Returns:
true if this delivery guarantee meets the minimum requirements of the specified delivery guarantee

Project Darkstar, Version 0.9.9.6
2009-05-08 15:39:40

Copyright © 2007-2009 Sun Microsystems, Inc. All rights reserved