test_class.declarator: packetIn
test_class.modifier: protected
test_class.original_string: protected OFPacketIn packetIn;
test_class.type: OFPacketIn
test_class.var_name: packetIn
test_class.declarator: testPacket
test_class.modifier: protected
test_class.original_string: protected IPacket testPacket;
test_class.type: IPacket
test_class.var_name: testPacket
test_class.declarator: testPacketSerialized
test_class.modifier: protected
test_class.original_string: protected byte[] testPacketSerialized;
test_class.type: byte[]
test_class.var_name: testPacketSerialized
test_class.declarator: mockFloodlightProvider
test_class.modifier: private
test_class.original_string: private MockFloodlightProvider mockFloodlightProvider;
test_class.type: MockFloodlightProvider
test_class.var_name: mockFloodlightProvider
test_class.declarator: hub
test_class.modifier: private
test_class.original_string: private Hub hub;
test_class.type: Hub
test_class.var_name: hub
test_class.file: src/agents/apps/floodlight/floodlight-1.0/src/test/java/net/floodlightcontroller/hub/HubTest.java
test_class.identifier: HubTest
test_class.superclass: extends FloodlightTestCase
test_case.body: @Test
      public void testFloodNoBufferId() throws Exception {
          // Mock up our expected behavior
          IOFSwitch mockSwitch = createMock(IOFSwitch.class);
          EasyMock.expect(mockSwitch.getOFFactory()).andReturn(OFFactories.getFactory(OFVersion.OF_13)).anyTimes();
          
          // build our expected flooded packetOut
      	OFActionOutput ao = OFFactories.getFactory(OFVersion.OF_13).actions().buildOutput().setPort(OFPort.FLOOD).build();
      	List<OFAction> al = new ArrayList<OFAction>();
      	al.add(ao);
          OFPacketOut po = OFFactories.getFactory(OFVersion.OF_13).buildPacketOut()
              .setActions(al)
              .setBufferId(OFBufferId.NO_BUFFER)
              .setXid(1)
              .setInPort(OFPort.of(1))
              .setData(this.testPacketSerialized).build();
          
          Capture<OFMessage> wc1 = new Capture<OFMessage>(CaptureType.ALL);
          
          mockSwitch.write(capture(wc1));
  
          // Start recording the replay on the mocks
          replay(mockSwitch);
          // Get the listener and trigger the packet in
          IOFMessageListener listener = mockFloodlightProvider.getListeners().get(
                  OFType.PACKET_IN).get(0);
          listener.receive(mockSwitch, this.packetIn,
                           parseAndAnnotate(this.packetIn));
  
          // Verify the replay matched our expectations
          verify(mockSwitch);
          
          assertTrue(wc1.hasCaptured());
          OFMessage m = wc1.getValue();
          assertTrue(OFMessageUtils.equalsIgnoreXid(m, po));
      }
test_case.class_method_signature: HubTest.testFloodNoBufferId()
test_case.full_signature: @Test public void testFloodNoBufferId()
test_case.identifier: testFloodNoBufferId
test_case.invocations: createMock anyTimes andReturn expect getOFFactory getFactory build setPort buildOutput actions getFactory add build setData setInPort setXid setBufferId setActions buildPacketOut getFactory of write capture replay get get getListeners receive parseAndAnnotate verify assertTrue hasCaptured getValue assertTrue equalsIgnoreXid
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFloodNoBufferId()
focal_class.declarator: floodlightProvider
focal_class.modifier: private
focal_class.original_string: private IFloodlightProviderService floodlightProvider;
focal_class.type: IFloodlightProviderService
focal_class.var_name: floodlightProvider
focal_class.file: src/agents/apps/floodlight/floodlight-1.0/src/main/java/net/floodlightcontroller/hub/Hub.java
focal_class.identifier: Hub
focal_class.interfaces: implements IFloodlightModule, IOFMessageListener
focal_class.class_method_signature: Hub.setFloodlightProvider(IFloodlightProviderService floodlightProvider)
focal_class.full_signature: public void setFloodlightProvider(IFloodlightProviderService floodlightProvider)
focal_class.identifier: setFloodlightProvider
focal_class.modifiers: public
focal_class.parameters: (IFloodlightProviderService floodlightProvider)
focal_class.return: void
focal_class.signature: void setFloodlightProvider(IFloodlightProviderService floodlightProvider)
focal_class.class_method_signature: Hub.getName()
focal_class.full_signature: @Override public String getName()
focal_class.identifier: getName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: Hub.receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_class.full_signature: public Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_class.identifier: receive
focal_class.modifiers: public
focal_class.parameters: (IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_class.return: Command
focal_class.signature: Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_class.class_method_signature: Hub.createHubFlowMod(IOFSwitch sw, OFMessage msg)
focal_class.full_signature: private OFMessage createHubFlowMod(IOFSwitch sw, OFMessage msg)
focal_class.identifier: createHubFlowMod
focal_class.modifiers: private
focal_class.parameters: (IOFSwitch sw, OFMessage msg)
focal_class.return: OFMessage
focal_class.signature: OFMessage createHubFlowMod(IOFSwitch sw, OFMessage msg)
focal_class.class_method_signature: Hub.createHubPacketOut(IOFSwitch sw, OFMessage msg)
focal_class.full_signature: private OFMessage createHubPacketOut(IOFSwitch sw, OFMessage msg)
focal_class.identifier: createHubPacketOut
focal_class.modifiers: private
focal_class.parameters: (IOFSwitch sw, OFMessage msg)
focal_class.return: OFMessage
focal_class.signature: OFMessage createHubPacketOut(IOFSwitch sw, OFMessage msg)
focal_class.class_method_signature: Hub.isCallbackOrderingPrereq(OFType type, String name)
focal_class.full_signature: @Override public boolean isCallbackOrderingPrereq(OFType type, String name)
focal_class.identifier: isCallbackOrderingPrereq
focal_class.modifiers: @Override public
focal_class.parameters: (OFType type, String name)
focal_class.return: boolean
focal_class.signature: boolean isCallbackOrderingPrereq(OFType type, String name)
focal_class.class_method_signature: Hub.isCallbackOrderingPostreq(OFType type, String name)
focal_class.full_signature: @Override public boolean isCallbackOrderingPostreq(OFType type, String name)
focal_class.identifier: isCallbackOrderingPostreq
focal_class.modifiers: @Override public
focal_class.parameters: (OFType type, String name)
focal_class.return: boolean
focal_class.signature: boolean isCallbackOrderingPostreq(OFType type, String name)
focal_class.class_method_signature: Hub.getModuleServices()
focal_class.full_signature: @Override public Collection<Class<? extends IFloodlightService>> getModuleServices()
focal_class.identifier: getModuleServices
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<Class<? extends IFloodlightService>>
focal_class.signature: Collection<Class<? extends IFloodlightService>> getModuleServices()
focal_class.class_method_signature: Hub.getServiceImpls()
focal_class.full_signature: @Override public Map<Class<? extends IFloodlightService>, IFloodlightService> getServiceImpls()
focal_class.identifier: getServiceImpls
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Map<Class<? extends IFloodlightService>, IFloodlightService>
focal_class.signature: Map<Class<? extends IFloodlightService>, IFloodlightService> getServiceImpls()
focal_class.class_method_signature: Hub.getModuleDependencies()
focal_class.full_signature: @Override public Collection<Class<? extends IFloodlightService>> getModuleDependencies()
focal_class.identifier: getModuleDependencies
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<Class<? extends IFloodlightService>>
focal_class.signature: Collection<Class<? extends IFloodlightService>> getModuleDependencies()
focal_class.class_method_signature: Hub.init(FloodlightModuleContext context)
focal_class.full_signature: @Override public void init(FloodlightModuleContext context)
focal_class.identifier: init
focal_class.modifiers: @Override public
focal_class.parameters: (FloodlightModuleContext context)
focal_class.return: void
focal_class.signature: void init(FloodlightModuleContext context)
focal_class.class_method_signature: Hub.startUp(FloodlightModuleContext context)
focal_class.full_signature: @Override public void startUp(FloodlightModuleContext context)
focal_class.identifier: startUp
focal_class.modifiers: @Override public
focal_class.parameters: (FloodlightModuleContext context)
focal_class.return: void
focal_class.signature: void startUp(FloodlightModuleContext context)
focal_method.body: public Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx) {
      	OFMessage outMessage;
      	HubType ht = HubType.USE_PACKET_OUT;
      	switch (ht) {
      	case USE_FLOW_MOD:
              outMessage = createHubFlowMod(sw, msg);
              break;
          default:
      	case USE_PACKET_OUT:
              outMessage = createHubPacketOut(sw, msg);
              break;
      	}
          sw.write(outMessage);
  
          return Command.CONTINUE;
      }
focal_method.class_method_signature: Hub.receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_method.full_signature: public Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_method.identifier: receive
focal_method.invocations: createHubFlowMod createHubPacketOut write
focal_method.modifiers: public
focal_method.parameters: (IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_method.return: Command
focal_method.signature: Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx)