Ask Your Question
0

Rpc registered into md sal

asked 2015-02-23 22:37:41 -0700

anonymous user

Anonymous

updated 2015-03-13 04:04:11 -0700

Tony Tkacik gravatar image

Hi, i wanted to get all the Rpcs registered into mdsal. Can anyone tell me by which method i can get this ??

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-03-13 04:03:36 -0700

Tony Tkacik gravatar image

Are you looking for example how to register RPCs? or way to provide RPC registration?

Good start is looking into https://wiki.opendaylight.org/view/ControllerCoreFunctionality_Tutorials:Main which have some nice tutorials and archetypes for you to start.

Otherwise RPC registration is simple - you implement generated RPC interface class ModelName Service and register it to MD-SAL.

From https://wiki.opendaylight.org/view/OpenDaylightController:MD-SAL:StartupProject_Archetype :

@Override
public void onSessionInitiated(ProviderContext session) {
    LOG.info("HelloProvider Session Initiated");
    helloService = session.addRpcImplementation(HelloService.class, new HelloWorldImpl());
}

If you want to register multiple RPC types, current APIs allows you to do this in following form:

MyServiceImpl myService = new MyServiceImpl();
RpcRegistration<FooService> fooReg = session.addRpcImplementation(FooService.class, myService);
RpcRegistration<BarService> barReg = session.addRpcImplementation(BarService.class, myService);
edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2015-02-23 22:37:41 -0700

Seen: 246 times

Last updated: Mar 13 '15