rpc/servlet_handler.go

23 lines
544 B
Go
Raw Permalink Normal View History

2017-11-28 16:24:16 +00:00
package rpc
import (
"git.loafle.net/commons_go/rpc/protocol"
cuc "git.loafle.net/commons_go/util/context"
)
type ServletHandler interface {
ServletContext(parent cuc.Context) ServletContext
Init(servletCTX ServletContext) error
Invoke(servletCTX ServletContext, requestCodec protocol.RegistryCodec) (result interface{}, err error)
Destroy(servletCTX ServletContext)
RegisterCodec(contentType string, codec protocol.ServerCodec)
getCodec(contentType string) (protocol.ServerCodec, error)
GetPendingResponses() int
Validate()
}