|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.presents.net.Transport
public class Transport
Message transport parameters. These include the type of transport and the channel (used to define independent streams for ordered transport), and may eventually include message priority, etc.
| Nested Class Summary | |
|---|---|
static class |
Transport.Type
The available types of transport. |
| Field Summary | |
|---|---|
protected int |
_channel
The transport channel. |
protected static HashIntMap<Transport>[] |
_ordered
Ordered instances mapped by type and channel. |
protected Transport.Type |
_type
The type of transport. |
protected static Transport[] |
_unordered
Unordered instances mapped by type (would use EnumMap, but it doesn't
work with Retroweaver). |
static Transport |
DEFAULT
The default mode of transport. |
static Transport |
RELIABLE_ORDERED
The reliable/ordered mode on the default channel. |
static Transport |
RELIABLE_UNORDERED
The reliable/unordered mode. |
static Transport |
UNRELIABLE_ORDERED
The unreliable/ordered mode on the default channel. |
static Transport |
UNRELIABLE_UNORDERED
The unreliable/unordered mode of transport. |
| Constructor Summary | |
|---|---|
protected |
Transport(Transport.Type type)
|
protected |
Transport(Transport.Type type,
int channel)
|
| Method Summary | |
|---|---|
Transport |
combine(Transport other)
Returns a transport that satisfies the requirements of this and the specified other transport. |
boolean |
equals(Object other)
|
int |
getChannel()
Returns the transport channel. |
static Transport |
getInstance(Transport.Type type)
Returns the shared instance with the specified parameters. |
static Transport |
getInstance(Transport.Type type,
int channel)
Returns the shared instance with the specified parameters. |
Transport.Type |
getType()
Returns the type of transport. |
int |
hashCode()
|
boolean |
isOrdered()
Checks whether this transport guarantees that messages will be received in the order in which they were sent, if they are received at all. |
boolean |
isReliable()
Checks whether this transport guarantees that messages will be delivered. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Transport UNRELIABLE_UNORDERED
public static final Transport UNRELIABLE_ORDERED
public static final Transport RELIABLE_UNORDERED
public static final Transport RELIABLE_ORDERED
public static final Transport DEFAULT
protected Transport.Type _type
protected int _channel
protected static Transport[] _unordered
EnumMap, but it doesn't
work with Retroweaver).
protected static HashIntMap<Transport>[] _ordered
| Constructor Detail |
|---|
protected Transport(Transport.Type type)
protected Transport(Transport.Type type,
int channel)
| Method Detail |
|---|
public static Transport getInstance(Transport.Type type)
public static Transport getInstance(Transport.Type type,
int channel)
public Transport.Type getType()
public int getChannel()
public boolean isReliable()
public boolean isOrdered()
public Transport combine(Transport other)
public int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||