2017-10-31 09:25:44 +00:00
|
|
|
package server
|
|
|
|
|
|
|
|
import (
|
2017-11-08 06:35:27 +00:00
|
|
|
"git.loafle.net/commons_go/rpc"
|
|
|
|
"git.loafle.net/commons_go/rpc/protocol"
|
2017-10-31 09:25:44 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type ServerHandlers struct {
|
2017-11-08 06:35:27 +00:00
|
|
|
rpc.ServerHandlers
|
|
|
|
RPCRegistry rpc.Registry
|
2017-10-31 09:25:44 +00:00
|
|
|
}
|
|
|
|
|
2017-11-08 06:35:27 +00:00
|
|
|
func (sh *ServerHandlers) Invoke(codec protocol.RegistryCodec) (result interface{}, err error) {
|
|
|
|
return sh.RPCRegistry.Invoke(codec)
|
2017-10-31 09:25:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (sh *ServerHandlers) Validate() {
|
2017-11-01 06:17:32 +00:00
|
|
|
sh.ServerHandlers.Validate()
|
|
|
|
|
2017-11-08 06:35:27 +00:00
|
|
|
if nil == sh.RPCRegistry {
|
|
|
|
panic("RPCRegistry must be specified.")
|
2017-10-31 09:25:44 +00:00
|
|
|
}
|
|
|
|
}
|