rpc/servlet_handler.go

22 lines
840 B
Go
Raw Normal View History

2017-11-26 10:15:51 +00:00
package rpc
import "git.loafle.net/commons_go/rpc/protocol"
type ServletHandler interface {
2017-11-27 12:04:25 +00:00
Init(servletCTX ServletContext) error
2017-11-26 10:15:51 +00:00
2017-11-27 12:04:25 +00:00
GetRequest(servletCTX ServletContext, codec protocol.ServerCodec, reader interface{}) (protocol.ServerRequestCodec, error)
Invoke(servletCTX ServletContext, requestCodec protocol.RegistryCodec) (result interface{}, err error)
SendResponse(servletCTX ServletContext, requestCodec protocol.ServerRequestCodec, writer interface{}, result interface{}, err error) error
SendNotification(servletCTX ServletContext, codec protocol.ServerCodec, writer interface{}, method string, args ...interface{}) error
2017-11-26 10:15:51 +00:00
2017-11-27 12:04:25 +00:00
Destroy(servletCTX ServletContext)
2017-11-26 10:15:51 +00:00
RegisterCodec(contentType string, codec protocol.ServerCodec)
getCodec(contentType string) (protocol.ServerCodec, error)
GetPendingMessages() int
Validate()
}