test_class.declarator: logger = LoggerFactory.getLogger(OFConnectionTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger logger = LoggerFactory.getLogger(OFConnectionTest.class);
test_class.type: Logger
test_class.var_name: logger
test_class.declarator: factory
test_class.modifier: private
test_class.original_string: private OFFactory factory;
test_class.type: OFFactory
test_class.var_name: factory
test_class.declarator: channel
test_class.modifier: private
test_class.original_string: private Channel channel;
test_class.type: Channel
test_class.var_name: channel
test_class.declarator: conn
test_class.modifier: private
test_class.original_string: private OFConnection conn;
test_class.type: OFConnection
test_class.var_name: conn
test_class.declarator: switchId
test_class.modifier: private
test_class.original_string: private DatapathId switchId;
test_class.type: DatapathId
test_class.var_name: switchId
test_class.declarator: timer
test_class.modifier: private
test_class.original_string: private Timer timer;
test_class.type: Timer
test_class.var_name: timer
test_class.declarator: eventLoop
test_class.modifier: private
test_class.original_string: private TestEventLoop eventLoop;
test_class.type: TestEventLoop
test_class.var_name: eventLoop
test_class.file: src/agents/apps/floodlight/floodlight-1.2/src/test/java/net/floodlightcontroller/core/internal/OFConnectionTest.java
test_class.identifier: OFConnectionTest
test_case.body: @Test(timeout = 5000)
      public void testMessageWriteList() throws InterruptedException, ExecutionException {
          Capture<List<OFMessage>> cMsgList = prepareChannelForWriteList();
  
          OFHello hello = factory.hello(ImmutableList.<OFHelloElem>of());
          OFPacketOut packetOut = factory.buildPacketOut()
                  .setData(new byte[] { 0x01, 0x02, 0x03, 0x04 })
                  .setActions(ImmutableList.<OFAction>of( factory.actions().output(OFPort.of(1), 0)))
                  .build();
  
          conn.write(ImmutableList.of(hello, packetOut));
          eventLoop.runTasks();
          assertThat("Write should have been written", cMsgList.hasCaptured(), equalTo(true));
          List<OFMessage> value = cMsgList.getValue();
          logger.info("Captured channel write: "+value);
          assertThat("Should have captured MsgList", cMsgList.getValue(),
                  Matchers.<OFMessage> contains(hello, packetOut));
      }
test_case.class_method_signature: OFConnectionTest.testMessageWriteList()
test_case.full_signature: @Test(timeout = 5000) public void testMessageWriteList()
test_case.identifier: testMessageWriteList
test_case.invocations: prepareChannelForWriteList hello of build setActions setData buildPacketOut of output actions of write of runTasks assertThat hasCaptured equalTo getValue info assertThat getValue contains
test_case.modifiers: @Test(timeout = 5000) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMessageWriteList()
focal_class.declarator: logger = LoggerFactory.getLogger(OFConnection.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(OFConnection.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: dpid
focal_class.modifier: private final
focal_class.original_string: private final DatapathId dpid;
focal_class.type: DatapathId
focal_class.var_name: dpid
focal_class.declarator: factory
focal_class.modifier: private final
focal_class.original_string: private final OFFactory factory;
focal_class.type: OFFactory
focal_class.var_name: factory
focal_class.declarator: channel
focal_class.modifier: private final
focal_class.original_string: private final Channel channel;
focal_class.type: Channel
focal_class.var_name: channel
focal_class.declarator: auxId
focal_class.modifier: private final
focal_class.original_string: private final OFAuxId auxId;
focal_class.type: OFAuxId
focal_class.var_name: auxId
focal_class.declarator: timer
focal_class.modifier: private final
focal_class.original_string: private final Timer timer;
focal_class.type: Timer
focal_class.var_name: timer
focal_class.declarator: connectedSince
focal_class.modifier: private final
focal_class.original_string: private final Date connectedSince;
focal_class.type: Date
focal_class.var_name: connectedSince
focal_class.declarator: xidDeliverableMap
focal_class.modifier: private final
focal_class.original_string: private final Map<Long, Deliverable<?>> xidDeliverableMap;
focal_class.type: Map<Long, Deliverable<?>>
focal_class.var_name: xidDeliverableMap
focal_class.declarator: DELIVERABLE_TIME_OUT = 60
focal_class.modifier: private static final
focal_class.original_string: private static final long DELIVERABLE_TIME_OUT = 60;
focal_class.type: long
focal_class.var_name: DELIVERABLE_TIME_OUT
focal_class.declarator: DELIVERABLE_TIME_OUT_UNIT = TimeUnit.SECONDS
focal_class.modifier: private static final
focal_class.original_string: private static final TimeUnit DELIVERABLE_TIME_OUT_UNIT = TimeUnit.SECONDS;
focal_class.type: TimeUnit
focal_class.var_name: DELIVERABLE_TIME_OUT_UNIT
focal_class.declarator: counters
focal_class.modifier: private final
focal_class.original_string: private final OFConnectionCounters counters;
focal_class.type: OFConnectionCounters
focal_class.var_name: counters
focal_class.declarator: listener
focal_class.modifier: private
focal_class.original_string: private IOFConnectionListener listener;
focal_class.type: IOFConnectionListener
focal_class.var_name: listener
focal_class.declarator: latency
focal_class.modifier: private volatile
focal_class.original_string: private volatile U64 latency;
focal_class.type: U64
focal_class.var_name: latency
focal_class.file: src/agents/apps/floodlight/floodlight-1.2/src/main/java/net/floodlightcontroller/core/internal/OFConnection.java
focal_class.identifier: OFConnection
focal_class.interfaces: implements IOFConnection, IOFConnectionBackend
focal_class.class_method_signature: OFConnection.OFConnection(@Nonnull DatapathId dpid,
  			@Nonnull OFFactory factory,
  			@Nonnull Channel channel,
  			@Nonnull OFAuxId auxId,
  			@Nonnull IDebugCounterService debugCounters,
  			@Nonnull Timer timer)
focal_class.full_signature: public  OFConnection(@Nonnull DatapathId dpid,
  			@Nonnull OFFactory factory,
  			@Nonnull Channel channel,
  			@Nonnull OFAuxId auxId,
  			@Nonnull IDebugCounterService debugCounters,
  			@Nonnull Timer timer)
focal_class.identifier: OFConnection
focal_class.modifiers: public
focal_class.parameters: (@Nonnull DatapathId dpid,
  			@Nonnull OFFactory factory,
  			@Nonnull Channel channel,
  			@Nonnull OFAuxId auxId,
  			@Nonnull IDebugCounterService debugCounters,
  			@Nonnull Timer timer)
focal_class.signature:  OFConnection(@Nonnull DatapathId dpid,
  			@Nonnull OFFactory factory,
  			@Nonnull Channel channel,
  			@Nonnull OFAuxId auxId,
  			@Nonnull IDebugCounterService debugCounters,
  			@Nonnull Timer timer)
focal_class.class_method_signature: OFConnection.write(final Iterable<OFMessage> msgList)
focal_class.full_signature: @Override public Collection<OFMessage> write(final Iterable<OFMessage> msgList)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (final Iterable<OFMessage> msgList)
focal_class.return: Collection<OFMessage>
focal_class.signature: Collection<OFMessage> write(final Iterable<OFMessage> msgList)
focal_class.class_method_signature: OFConnection.write(OFMessage m)
focal_class.full_signature: @Override public boolean write(OFMessage m)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (OFMessage m)
focal_class.return: boolean
focal_class.signature: boolean write(OFMessage m)
focal_class.class_method_signature: OFConnection.writeRequest(OFRequest<R> request)
focal_class.full_signature: @Override public ListenableFuture<R> writeRequest(OFRequest<R> request)
focal_class.identifier: writeRequest
focal_class.modifiers: @Override public
focal_class.parameters: (OFRequest<R> request)
focal_class.return: ListenableFuture<R>
focal_class.signature: ListenableFuture<R> writeRequest(OFRequest<R> request)
focal_class.class_method_signature: OFConnection.writeStatsRequest(
  			OFStatsRequest<REPLY> request)
focal_class.full_signature: @Override public ListenableFuture<List<REPLY>> writeStatsRequest(
  			OFStatsRequest<REPLY> request)
focal_class.identifier: writeStatsRequest
focal_class.modifiers: @Override public
focal_class.parameters: (
  			OFStatsRequest<REPLY> request)
focal_class.return: ListenableFuture<List<REPLY>>
focal_class.signature: ListenableFuture<List<REPLY>> writeStatsRequest(
  			OFStatsRequest<REPLY> request)
focal_class.class_method_signature: OFConnection.disconnected()
focal_class.full_signature: public void disconnected()
focal_class.identifier: disconnected
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void disconnected()
focal_class.class_method_signature: OFConnection.disconnect()
focal_class.full_signature: @Override public void disconnect()
focal_class.identifier: disconnect
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void disconnect()
focal_class.class_method_signature: OFConnection.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: OFConnection.getConnectedSince()
focal_class.full_signature: @Override public Date getConnectedSince()
focal_class.identifier: getConnectedSince
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Date
focal_class.signature: Date getConnectedSince()
focal_class.class_method_signature: OFConnection.registerDeliverable(long xid, Deliverable<?> deliverable)
focal_class.full_signature: private void registerDeliverable(long xid, Deliverable<?> deliverable)
focal_class.identifier: registerDeliverable
focal_class.modifiers: private
focal_class.parameters: (long xid, Deliverable<?> deliverable)
focal_class.return: void
focal_class.signature: void registerDeliverable(long xid, Deliverable<?> deliverable)
focal_class.class_method_signature: OFConnection.handleGenericDeliverable(OFMessage reply)
focal_class.full_signature: public boolean handleGenericDeliverable(OFMessage reply)
focal_class.identifier: handleGenericDeliverable
focal_class.modifiers: public
focal_class.parameters: (OFMessage reply)
focal_class.return: boolean
focal_class.signature: boolean handleGenericDeliverable(OFMessage reply)
focal_class.class_method_signature: OFConnection.cancelAllPendingRequests()
focal_class.full_signature: @Override public void cancelAllPendingRequests()
focal_class.identifier: cancelAllPendingRequests
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void cancelAllPendingRequests()
focal_class.class_method_signature: OFConnection.isConnected()
focal_class.full_signature: @Override public boolean isConnected()
focal_class.identifier: isConnected
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isConnected()
focal_class.class_method_signature: OFConnection.getRemoteInetAddress()
focal_class.full_signature: @Override public SocketAddress getRemoteInetAddress()
focal_class.identifier: getRemoteInetAddress
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: SocketAddress
focal_class.signature: SocketAddress getRemoteInetAddress()
focal_class.class_method_signature: OFConnection.getLocalInetAddress()
focal_class.full_signature: @Override public SocketAddress getLocalInetAddress()
focal_class.identifier: getLocalInetAddress
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: SocketAddress
focal_class.signature: SocketAddress getLocalInetAddress()
focal_class.class_method_signature: OFConnection.deliverResponse(OFMessage m)
focal_class.full_signature: public boolean deliverResponse(OFMessage m)
focal_class.identifier: deliverResponse
focal_class.modifiers: public
focal_class.parameters: (OFMessage m)
focal_class.return: boolean
focal_class.signature: boolean deliverResponse(OFMessage m)
focal_class.class_method_signature: OFConnection.isWritable()
focal_class.full_signature: @Override public boolean isWritable()
focal_class.identifier: isWritable
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isWritable()
focal_class.class_method_signature: OFConnection.getDatapathId()
focal_class.full_signature: @Override public DatapathId getDatapathId()
focal_class.identifier: getDatapathId
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: DatapathId
focal_class.signature: DatapathId getDatapathId()
focal_class.class_method_signature: OFConnection.getAuxId()
focal_class.full_signature: @Override public OFAuxId getAuxId()
focal_class.identifier: getAuxId
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: OFAuxId
focal_class.signature: OFAuxId getAuxId()
focal_class.class_method_signature: OFConnection.getPendingRequestIds()
focal_class.full_signature:  Set<Long> getPendingRequestIds()
focal_class.identifier: getPendingRequestIds
focal_class.parameters: ()
focal_class.return: Set<Long>
focal_class.signature: Set<Long> getPendingRequestIds()
focal_class.class_method_signature: OFConnection.getOFFactory()
focal_class.full_signature: @Override public OFFactory getOFFactory()
focal_class.identifier: getOFFactory
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: OFFactory
focal_class.signature: OFFactory getOFFactory()
focal_class.class_method_signature: OFConnection.getListener()
focal_class.full_signature: public IOFConnectionListener getListener()
focal_class.identifier: getListener
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: IOFConnectionListener
focal_class.signature: IOFConnectionListener getListener()
focal_class.class_method_signature: OFConnection.setListener(IOFConnectionListener listener)
focal_class.full_signature: @Override public void setListener(IOFConnectionListener listener)
focal_class.identifier: setListener
focal_class.modifiers: @Override public
focal_class.parameters: (IOFConnectionListener listener)
focal_class.return: void
focal_class.signature: void setListener(IOFConnectionListener listener)
focal_class.class_method_signature: OFConnection.messageReceived(OFMessage m)
focal_class.full_signature: public void messageReceived(OFMessage m)
focal_class.identifier: messageReceived
focal_class.modifiers: public
focal_class.parameters: (OFMessage m)
focal_class.return: void
focal_class.signature: void messageReceived(OFMessage m)
focal_class.class_method_signature: OFConnection.getLatency()
focal_class.full_signature: @Override public U64 getLatency()
focal_class.identifier: getLatency
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: U64
focal_class.signature: U64 getLatency()
focal_class.class_method_signature: OFConnection.updateLatency(U64 latency)
focal_class.full_signature: @Override public void updateLatency(U64 latency)
focal_class.identifier: updateLatency
focal_class.modifiers: @Override public
focal_class.parameters: (U64 latency)
focal_class.return: void
focal_class.signature: void updateLatency(U64 latency)
focal_method.body: @Override
  	public Collection<OFMessage> write(final Iterable<OFMessage> msgList) {
  		if (!isConnected()) {
  			if (logger.isDebugEnabled())
  				logger.debug(this.toString() + " : not connected - dropping {} element msglist {} ",
  						Iterables.size(msgList),
  						String.valueOf(msgList).substring(0, 80));
  			return IterableUtils.toCollection(msgList);
  		}
  		for (OFMessage m : msgList) {			
  			if (logger.isTraceEnabled()) {
  				logger.trace("{}: send {}", this, m);
  				counters.updateWriteStats(m);
  			}
  		}
  		this.channel.eventLoop().execute(new WriteMessageTask(msgList));
  		return Collections.emptyList();
  	}
focal_method.class_method_signature: OFConnection.write(final Iterable<OFMessage> msgList)
focal_method.full_signature: @Override public Collection<OFMessage> write(final Iterable<OFMessage> msgList)
focal_method.identifier: write
focal_method.invocations: isConnected isDebugEnabled debug toString size substring valueOf toCollection isTraceEnabled trace updateWriteStats execute eventLoop emptyList
focal_method.modifiers: @Override public
focal_method.parameters: (final Iterable<OFMessage> msgList)
focal_method.return: Collection<OFMessage>
focal_method.signature: Collection<OFMessage> write(final Iterable<OFMessage> msgList)