Controller implements IFloodlightProviderService, IStorageSourceListener, IInfoProvider { void reassertRole(OFSwitchHandshakeHandler ofSwitchHandshakeHandler, HARole role) { roleManager.reassertRole(ofSwitchHandshakeHandler, role); }  @Override Set<String> getUplinkPortPrefixSet(); void setUplinkPortPrefixSet(Set<String> prefixSet); @Override ModuleLoaderState getModuleLoaderState(); void setDebugEvent(IDebugEventService debugEvent); void setSwitchService(IOFSwitchService switchService); IOFSwitchService getSwitchService(); @Override int getWorkerThreads(); @Override HARole getRole(); @Override RoleInfo getRoleInfo(); @Override void setRole(HARole role, String changeDescription); @Override void handleMessage(IOFSwitch sw, OFMessage m,
                                 FloodlightContext bContext); @Override String getControllerId(); @Override Set<IPv4Address> getOFAddresses(); @Override TransportPort getOFPort(); @Override synchronized void addCompletionListener(IControllerCompletionListener listener); @Override synchronized void removeCompletionListener(IControllerCompletionListener listener); @Override synchronized void addOFMessageListener(OFType type, IOFMessageListener listener); @Override synchronized void removeOFMessageListener(OFType type, IOFMessageListener listener); void removeOFMessageListeners(OFType type); @Override Map<OFType, List<IOFMessageListener>> getListeners(); @Override void handleOutgoingMessage(IOFSwitch sw, OFMessage m); @Override void run(); void init(Map<String, String> configParams); void startupComponents(FloodlightModuleLoader floodlightModuleLoader); @Override void addInfoProvider(String type, IInfoProvider provider); @Override void removeInfoProvider(String type, IInfoProvider provider); @Override Map<String, Object> getControllerInfo(String type); @Override void addHAListener(IHAListener listener); @Override void removeHAListener(IHAListener listener); @Override Map<String, String> getControllerNodeIPs(); @Override void rowsModified(String tableName, Set<Object> rowKeys); @Override void rowsDeleted(String tableName, Set<Object> rowKeys); @Override long getSystemStartTime(); @Override Map<String, Long> getMemory(); @Override Long getUptime(); @Override void addUpdateToQueue(IUpdate update); @Override Map<String, Object> getInfo(String type); @Override RoleManager getRoleManager(); Optional<ControllerId> getId(); @Override Timer getTimer(); ControllerCounters getCounters(); static final int SEND_BUFFER_SIZE; }
@Test public void testChannelHandlerMaster() { OFSwitchHandshakeHandler h = createMock(OFSwitchHandshakeHandler.class); reset(h); h.sendRoleRequestIfNotPending(OFControllerRole.ROLE_MASTER); replay(h); controller.reassertRole(h, HARole.ACTIVE); verify(h); reset(h); replay(h); controller.reassertRole(h, HARole.STANDBY); verify(h); }