本文整理汇总了Java中org.opendaylight.controller.sal.flowprogrammer.IFlowProgrammerService类的典型用法代码示例。如果您正苦于以下问题:Java IFlowProgrammerService类的具体用法?Java IFlowProgrammerService怎么用?Java IFlowProgrammerService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IFlowProgrammerService类属于org.opendaylight.controller.sal.flowprogrammer包,在下文中一共展示了IFlowProgrammerService类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: unsetFlowProgrammerService
import org.opendaylight.controller.sal.flowprogrammer.IFlowProgrammerService; //导入依赖的package包/类
/**
* Unsets FlowProgrammerService
*/
void unsetFlowProgrammerService(IFlowProgrammerService s) {
log.trace("Removed FlowProgrammerService.");
if (flowProgrammerService == s) {
flowProgrammerService = null;
}
}
示例2: configureInstance
import org.opendaylight.controller.sal.flowprogrammer.IFlowProgrammerService; //导入依赖的package包/类
public void configureInstance(Component c, Object imp, String containerName) {
log.trace("Configuring instance");
if (imp.equals(DissectorHandler.class)) {
// Define exported and used services for DissectorHandler component.
Dictionary<String, Object> props = new Hashtable<String, Object>();
props.put("salListenerName", "myDissectorHandler");
// Export IListenDataPacket interface to receive packet-in events.
c.setInterface(new String[] {IListenDataPacket.class.getName()}, props);
// Need the DataPacketService for encoding, decoding, sending data packets
c.add(createContainerServiceDependency(containerName).setService(
IDataPacketService.class).setCallbacks(
"setDataPacketService", "unsetDataPacketService")
.setRequired(true));
// Need FlowProgrammerService for programming flows
c.add(createContainerServiceDependency(containerName).setService(
IFlowProgrammerService.class).setCallbacks(
"setFlowProgrammerService", "unsetFlowProgrammerService")
.setRequired(true));
// Need SwitchManager service for enumerating ports of switch
c.add(createContainerServiceDependency(containerName).setService(
ISwitchManager.class).setCallbacks(
"setSwitchManagerService", "unsetSwitchManagerService")
.setRequired(true));
}
}
示例3: configureInstance
import org.opendaylight.controller.sal.flowprogrammer.IFlowProgrammerService; //导入依赖的package包/类
public void configureInstance(Component c, Object imp, String containerName) {
if (imp.equals(PacketHandler.class)) {
log.trace("Configuring packet handler");
// Export IListenDataPacket interface to receive packet-in events.
Dictionary<String, Object> props = new Hashtable<String, Object>();
props.put("salListenerName", "sdnmq");
c.setInterface(new String[] {IListenDataPacket.class.getName()}, props);
// Need the DataPacketService for decoding data packets
c.add(createContainerServiceDependency(containerName).setService(
IDataPacketService.class).setCallbacks(
"setDataPacketService", "unsetDataPacketService").setRequired(true));
} else if (imp.equals(PacketForwarder.class)) {
log.trace("Configuring packet forwarder");
// Need the DataPacketService for encoding and sending packets
c.add(createContainerServiceDependency(containerName).setService(
IDataPacketService.class).setCallbacks(
"setDataPacketService", "unsetDataPacketService").setRequired(true));
// Need SwitchManager service for finding nodes and node connectors
c.add(createContainerServiceDependency(containerName).setService(
ISwitchManager.class).setCallbacks(
"setSwitchManagerService", "unsetSwitchManagerService").setRequired(true));
} else if (imp.equals(FlowProgrammer.class)) {
log.trace("Configuring flow programmer");
// Need SwitchManager service for finding nodes and node connectors
c.add(createContainerServiceDependency(containerName).setService(
ISwitchManager.class).setCallbacks(
"setSwitchManagerService", "unsetSwitchManagerService").setRequired(true));
// Need FlowProgrammerService for programming flows
c.add(createContainerServiceDependency(containerName).setService(
IFlowProgrammerService.class).setCallbacks(
"setFlowProgrammerService", "unsetFlowProgrammerService").setRequired(true));
}
}
示例4: unsetFlowProgrammerService
import org.opendaylight.controller.sal.flowprogrammer.IFlowProgrammerService; //导入依赖的package包/类
/**
* Callback called by OpenDaylight when Flow Programmer Service is unbound.
*/
void unsetFlowProgrammerService(IFlowProgrammerService s) {
log.trace("Removed FlowProgrammerService.");
if (flowProgrammerService == s) {
flowProgrammerService = null;
}
}
示例5: configureInstance
import org.opendaylight.controller.sal.flowprogrammer.IFlowProgrammerService; //导入依赖的package包/类
/**
* Function that is called when configuration of the dependencies is
* required.
*
* @param c
* dependency manager Component object, used for configuring the
* dependencies exported and imported
* @param imp
* Implementation class that is being configured, needed as long
* as the same routine can configure multiple implementations
* @param containerName
* The containerName being configured, this allow also optional
* per-container different behavior if needed, usually should not
* be the case though.
*/
@Override
public void configureInstance(Component c, Object imp, String containerName) {
if (imp.equals(ForwardingRulesManager.class)) {
String interfaces[] = null;
Dictionary<String, Set<String>> props = new Hashtable<String, Set<String>>();
Set<String> propSet = new HashSet<String>();
propSet.add("frm.flowsSaveEvent");
props.put("cachenames", propSet);
// export the service
interfaces = new String[] { IContainerListener.class.getName(), ISwitchManagerAware.class.getName(),
IForwardingRulesManager.class.getName(), IInventoryListener.class.getName(),
ICacheUpdateAware.class.getName(), IConfigurationContainerAware.class.getName(),
IFlowProgrammerListener.class.getName() };
c.setInterface(interfaces, props);
c.add(createContainerServiceDependency(containerName).setService(IFlowProgrammerService.class)
.setCallbacks("setFlowProgrammerService", "unsetFlowProgrammerService").setRequired(true));
c.add(createContainerServiceDependency(containerName).setService(IClusterContainerServices.class)
.setCallbacks("setClusterContainerService", "unsetClusterContainerService").setRequired(true));
c.add(createContainerServiceDependency(containerName).setService(ISwitchManager.class)
.setCallbacks("setSwitchManager", "unsetSwitchManager").setRequired(true));
c.add(createContainerServiceDependency(containerName).setService(IForwardingRulesManagerAware.class)
.setCallbacks("setFrmAware", "unsetFrmAware").setRequired(false));
c.add(createContainerServiceDependency(containerName).setService(IContainer.class)
.setCallbacks("setIContainer", "unsetIContainer").setRequired(true));
}
}
示例6: setFlowProgrammerService
import org.opendaylight.controller.sal.flowprogrammer.IFlowProgrammerService; //导入依赖的package包/类
/**
* Sets a reference to the requested FlowProgrammerService
*/
void setFlowProgrammerService(IFlowProgrammerService s) {
log.trace("Set FlowProgrammerService.");
flowProgrammerService = s;
}
示例7: setFlowProgrammerService
import org.opendaylight.controller.sal.flowprogrammer.IFlowProgrammerService; //导入依赖的package包/类
public void setFlowProgrammerService(IFlowProgrammerService s) {
log.trace("Set FlowProgrammerService.");
this.programmer = s;
}
示例8: unsetFlowProgrammerService
import org.opendaylight.controller.sal.flowprogrammer.IFlowProgrammerService; //导入依赖的package包/类
public void unsetFlowProgrammerService(IFlowProgrammerService s) {
log.trace("Removed FlowProgrammerService.");
if (this.programmer == s) {
this.programmer = null;
}
}
示例9: configureInstance
import org.opendaylight.controller.sal.flowprogrammer.IFlowProgrammerService; //导入依赖的package包/类
@Override
public void configureInstance(Component c, Object imp, String containerName) {
if (imp.equals(JumpIP.class)) {
// export the service needed to listen to topology updates
final Dictionary<String, Object> props = new Hashtable<String, Object>();
props.put("StatisgetListenerName", "Statisget");
props.put("salListenerName", "datapacketget");
props.put("topoListenerName", "topoget");
//listen topology to update topo & handle packet_in
c.setInterface(new String[] { ITopologyManagerAware.class.getName(),
IListenDataPacket.class.getName() }, props);
//statistics service
c.add(createContainerServiceDependency(containerName)
.setService(IStatisticsManager.class)
.setCallbacks("setStatisticsManager", "unsetStatisticsManager")
.setRequired(false));
//flowprogrammer service
c.add(createContainerServiceDependency(containerName)
.setService(IFlowProgrammerService.class)
.setCallbacks("setFlowProgrammerService","unsetFlowProgrammerService")
.setRequired(true));
//topology service
c.add(createContainerServiceDependency(containerName)
.setService(ITopologyManager.class)
.setCallbacks("setTopologyManager", "unsetTopologyManager")
.setRequired(true));
//switch service
c.add(createContainerServiceDependency(containerName)
.setService(ISwitchManager.class)
.setCallbacks("setSwitchManager", "unsetSwitchManager")
.setRequired(false));
c.add(createContainerServiceDependency(containerName)
.setService(IfIptoHost.class)
.setCallbacks("setHostTracker", "unsetHostTracker")
.setRequired(true));
c.add(createContainerServiceDependency(containerName)
.setService(IDataPacketService.class)
.setCallbacks("setDataPacketService", "unsetDataPacketService")
.setRequired(true));
c.add(createContainerServiceDependency(containerName)
.setService(IForwardingRulesManager.class)
.setCallbacks("setForwarder", "unsetForwarder")
.setRequired(true));
}
}
示例10: setFlowProgrammerService
import org.opendaylight.controller.sal.flowprogrammer.IFlowProgrammerService; //导入依赖的package包/类
/**
* Callback called by OpenDaylight when Flow Programmer Service is bound.
*/
void setFlowProgrammerService(IFlowProgrammerService s) {
log.trace("Set FlowProgrammerService.");
flowProgrammerService = s;
}
示例11: setFlowProgrammerService
import org.opendaylight.controller.sal.flowprogrammer.IFlowProgrammerService; //导入依赖的package包/类
public void setFlowProgrammerService(IFlowProgrammerService service) {
this.programmer = service;
}
示例12: unsetFlowProgrammerService
import org.opendaylight.controller.sal.flowprogrammer.IFlowProgrammerService; //导入依赖的package包/类
public void unsetFlowProgrammerService(IFlowProgrammerService service) {
if (this.programmer == service) {
this.programmer = null;
}
}