func (c *Operation) registerHandler() {
	c.handlers = []rest.Handler{
		cmdutil.NewHTTPHandler(CreateInvitation, http.MethodPost, c.CreateInvitation),
		cmdutil.NewHTTPHandler(AcceptInvitation, http.MethodPost, c.AcceptInvitation),
		cmdutil.NewHTTPHandler(Actions, http.MethodGet, c.Actions),
		cmdutil.NewHTTPHandler(ActionContinue, http.MethodPost, c.ActionContinue),
		cmdutil.NewHTTPHandler(ActionStop, http.MethodPost, c.ActionStop),
	}
}
registerHandler register handlers to be exposed from this protocol service as REST API endpoints.
package outofband
import (
	"bytes"
	"fmt"
	"net/http"
	"github.com/gorilla/mux"
	client "github.com/hyperledger/aries-framework-go/pkg/client/outofband"
	"github.com/hyperledger/aries-framework-go/pkg/controller/command"
	"github.com/hyperledger/aries-framework-go/pkg/controller/command/outofband"
	"github.com/hyperledger/aries-framework-go/pkg/controller/internal/cmdutil"
	"github.com/hyperledger/aries-framework-go/pkg/controller/rest"
)
const (
	OperationID      = "/outofband"
	CreateInvitation = OperationID + "/create-invitation"
	AcceptRequest    = OperationID + "/accept-request"
	AcceptInvitation = OperationID + "/accept-invitation"
	Actions          = OperationID + "/actions"
	ActionContinue   = OperationID + "/{piid}/action-continue"
	ActionStop       = OperationID + "/{piid}/action-stop"
)
type Operation struct {
	command  *outofband.Command
	handlers []rest.Handler
}
func New(ctx client.Provider, notifier command.Notifier) (*Operation, error) {
	cmd, err := outofband.New(ctx, notifier)
	if err != nil {
		return nil, fmt.Errorf("outofband command : %w", err)
	}
	o := &Operation{command: cmd}
	o.registerHandler()
	return o, nil
}
func (c *Operation) GetRESTHandlers() []rest.Handler {
	return c.handlers
}