Package org.acplt.oncrpc
Class XdrEnum<T extends HasEncoding<T>>
java.lang.Object
org.acplt.oncrpc.XdrEnum<T>
- Type Parameters:
T- typical an enum class, see above.
- All Implemented Interfaces:
XdrAble
wrapper provides XdrAble for generated java enums.
e.g.: public enum SummaryAlarm implements HasEncoding { .. }
e.g.: public enum SummaryAlarm implements HasEncoding
- Author:
- zelgerpe
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> HasEncoding<T> create(int e, HasEncoding<T> tt) static <T> Tcreate(HasEncoding<T> tt, XdrDecodingStream xdr) static <T> TfromEncoding(int e, HasEncoding<T> tt) getValue()toString()voidDecodes -- that is: deserializes -- an object from a XDR stream in compliance to RFC 1832.voidEncodes -- that is: serializes -- an object into a XDR stream in compliance to RFC 1832.
-
Constructor Details
-
XdrEnum
-
XdrEnum
- Throws:
OncRpcExceptionIOException
-
-
Method Details
-
xdrEncode
Description copied from interface:XdrAbleEncodes -- that is: serializes -- an object into a XDR stream in compliance to RFC 1832.- Specified by:
xdrEncodein interfaceXdrAble- Parameters:
xdr- XDR stream to which information is sent for encoding.- Throws:
OncRpcException- if an ONC/RPC error occurs.IOException- if an I/O error occurs.
-
xdrDecode
Description copied from interface:XdrAbleDecodes -- that is: deserializes -- an object from a XDR stream in compliance to RFC 1832.- Specified by:
xdrDecodein interfaceXdrAble- Parameters:
xdr- XDR stream from which decoded information is retrieved.- Throws:
OncRpcException- if an ONC/RPC error occurs.IOException- if an I/O error occurs.
-
getWrapped
-
getValue
-
toString
-
create
public static <T> T create(HasEncoding<T> tt, XdrDecodingStream xdr) throws OncRpcException, IOException - Throws:
OncRpcExceptionIOException
-
create
- Throws:
OncRpcException
-
fromEncoding
-