public enum ConnectionModel extends Enum<ConnectionModel>
Enum Constant and Description |
---|
RECEIVER_THREAD
Each sender thread writes the message to the socket connection directly.
|
SENDER_RECEIVER_THREAD
Each socket uses a pair of threads: sender and receiver.
|
Modifier and Type | Method and Description |
---|---|
static ConnectionModel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ConnectionModel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConnectionModel RECEIVER_THREAD
This is the default ConnectionModel
.
In a multi-threaded application this ConnectionModel
should
perform as well as if not better than the SENDER_RECEIVER_THREAD
model. This is achieved by completely avoiding cross thread passing of
the message on a send.
public static final ConnectionModel SENDER_RECEIVER_THREAD
This was the default ConnectionModel
versions prior to 1.3.0.
This ConnectionModel
is most useful for connections where a
single write()
to the socket implementation is slow and the
application only uses a single write thread.
public static ConnectionModel[] values()
for (ConnectionModel c : ConnectionModel.values()) System.out.println(c);
public static ConnectionModel valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.