Thrift
An Introduction |
Prof. David Bernstein |
Computer Science Department |
bernstdh@jmu.edu |
bool
byte
i16, i32, i64
(i.e., 16,32, and 64 bit signed integers)double (i.e., 64 bit floating point)
string
void
(for return type)struct
exception
list
(i.e., ordered)set
(i.e., unordered)map
(i.e., with unique keys)interface
in Javaservice <name> { <returntype> <name>([<arguments>]...) [throws(<exception>...)] }
void
functions can be declared
async
TSocket
, TBufferedTransport
,
TFileTransport
close()
flush()
isOpen()
open()
read()
write()
read*()
and write*()
functions for all types
read*Begin()
and read*End()
write*Begin()
and write*End()
writeMessageBegin(name, type, seq)
and
writeMessageEnd()
name, type, seq = readMessageBegin()
and
readMessageEnd()
TProcessor
:
interface TProcessor
{
bool process(TProtocol in, TProtocol out) throws TException
}
TTransport
from a TServerTransport
TTrasportFactory
to "decorate" the
TTransport
TProtocolFactory
process()
on the TProcessor