Package net.morimekta.providence
Enum PServiceCallType
- java.lang.Object
-
- java.lang.Enum<PServiceCallType>
-
- net.morimekta.providence.PServiceCallType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<PServiceCallType>
,PEnumValue<PServiceCallType>
,PValue<PServiceCallType>
,net.morimekta.util.Numeric
,net.morimekta.util.Stringable
@Generated(value="net.morimekta.providence:providence-generator-java", comments="java:serializable") public enum PServiceCallType extends java.lang.Enum<PServiceCallType> implements PEnumValue<PServiceCallType>
The service call type is a base distinction of what the message means, and lets the server or client select the proper message to be serialized or deserialized from the service method descriptor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PServiceCallType._Builder
-
Enum Constant Summary
Enum Constants Enum Constant Description CALL
Normal service method call request.EXCEPTION
An application exception, i.e. either a non-declared exception, or a providence service or serialization exception.ONEWAY
A one-way call is a request that does not expect a response at all.REPLY
Normal method call reply.
-
Field Summary
Fields Modifier and Type Field Description static PEnumDescriptor<PServiceCallType>
kDescriptor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
asInteger()
java.lang.String
asString()
PEnumDescriptor<PServiceCallType>
descriptor()
static PServiceCallType
findById(java.lang.Integer id)
Find a value based in its IDstatic PServiceCallType
findByName(java.lang.String name)
Find a value based in its namestatic PEnumDescriptorProvider<PServiceCallType>
provider()
static PServiceCallType
valueForId(int id)
Get a value based in its IDstatic PServiceCallType
valueForName(java.lang.String name)
Get a value based in its namestatic PServiceCallType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static PServiceCallType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CALL
public static final PServiceCallType CALL
Normal service method call request.
-
REPLY
public static final PServiceCallType REPLY
Normal method call reply. This includes declared exceptions on the service method.
-
EXCEPTION
public static final PServiceCallType EXCEPTION
An application exception, i.e. either a non-declared exception, or a providence service or serialization exception. This is also happens when such exceptions happen on the server side, it will try to send an application exception back to the client.
-
ONEWAY
public static final PServiceCallType ONEWAY
A one-way call is a request that does not expect a response at all. The client will return as soon as the request is sent.
-
-
Field Detail
-
kDescriptor
public static final PEnumDescriptor<PServiceCallType> kDescriptor
-
-
Method Detail
-
values
public static PServiceCallType[] 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 (PServiceCallType c : PServiceCallType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PServiceCallType valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
asInteger
public int asInteger()
- Specified by:
asInteger
in interfacenet.morimekta.util.Numeric
-
asString
@Nonnull public java.lang.String asString()
- Specified by:
asString
in interfacenet.morimekta.util.Stringable
-
findById
@Nullable public static PServiceCallType findById(java.lang.Integer id)
Find a value based in its ID- Parameters:
id
- Id of value- Returns:
- Value found or null
-
findByName
@Nullable public static PServiceCallType findByName(java.lang.String name)
Find a value based in its name- Parameters:
name
- Name of value- Returns:
- Value found or null
-
valueForId
@Nonnull public static PServiceCallType valueForId(int id)
Get a value based in its ID- Parameters:
id
- Id of value- Returns:
- Value found
- Throws:
java.lang.IllegalArgumentException
- If no value for id is found
-
valueForName
@Nonnull public static PServiceCallType valueForName(@Nonnull java.lang.String name)
Get a value based in its name- Parameters:
name
- Name of value- Returns:
- Value found
- Throws:
java.lang.IllegalArgumentException
- If no value for name is found, or null name
-
descriptor
public PEnumDescriptor<PServiceCallType> descriptor()
- Specified by:
descriptor
in interfacePEnumValue<PServiceCallType>
- Specified by:
descriptor
in interfacePValue<PServiceCallType>
-
provider
public static PEnumDescriptorProvider<PServiceCallType> provider()
-
-