本文整理汇总了Java中se.sics.kompics.PortType类的典型用法代码示例。如果您正苦于以下问题:Java PortType类的具体用法?Java PortType怎么用?Java PortType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PortType类属于se.sics.kompics包,在下文中一共展示了PortType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: caseAPortDeclaration
import se.sics.kompics.PortType; //导入依赖的package包/类
@Override
public void caseAPortDeclaration(APortDeclaration node
) {
TypeModifierAdapter modap = new TypeModifierAdapter(context);
for (PModifier m : node.getModifier()) {
m.apply(modap);
}
int mods = modap.getMods();
JDefinedClass c = context.declare(mods, node.getIdentifier(), ClassType.CLASS);
try {
c.mods().setPublic(); // ports should be public so Kompics can load them
c._extends(PortType.class);
PortBodyAdapter pba = new PortBodyAdapter(c.instanceInit(), context);
node.getPortBody().apply(pba);
} finally {
context.popScope();
}
}
开发者ID:kompics,项目名称:kola,代码行数:21,代码来源:TypeDeclarationAdapter.java
示例2: doTrigger
import se.sics.kompics.PortType; //导入依赖的package包/类
@Override
public <P extends PortType> void doTrigger(KompicsEvent event, Port<P> port) {
if (event == null || port == null) {
throw new NullPointerException("Null event or null port when calling trigger.");
}
if (event instanceof DirectMsgNetty.Request ||
event instanceof RelayMsgNetty.Request ||
event instanceof DirectMsgNetty.SystemRequest
) {
logger.error("calling doTrigger - should call doRetry: " + event.getClass());
throw new IllegalStateException("Request msgs should not call doTrigger(). "
+ " They should call doRetry().");
}
trigger(event, port);
}
开发者ID:jimdowling,项目名称:nat-traverser,代码行数:16,代码来源:MsgRetryComponent.java
示例3: Service
import se.sics.kompics.PortType; //导入依赖的package包/类
public Service(String name, Class<? extends PortType> type, Component provider) {
this.name = name;
this.type = type;
this.provider = provider;
}
开发者ID:CaracalDB,项目名称:CaracalDB,代码行数:6,代码来源:Service.java
示例4: forClass
import se.sics.kompics.PortType; //导入依赖的package包/类
public List<Service> forClass(Class<? extends PortType> clazz) {
return forClass(clazz.getCanonicalName());
}
开发者ID:CaracalDB,项目名称:CaracalDB,代码行数:4,代码来源:ServiceRegistry.java
示例5: setSimulationPortType
import se.sics.kompics.PortType; //导入依赖的package包/类
public static void setSimulationPortType(Class<? extends PortType> portType) {
simulationPortType = portType;
}
开发者ID:CaracalDB,项目名称:CaracalDB,代码行数:4,代码来源:VirtualSimulator.java
示例6: doSubscribe
import se.sics.kompics.PortType; //导入依赖的package包/类
@Override
public <E extends KompicsEvent, P extends PortType> void doSubscribe(Handler<E> handler, Port<P> port) {
subscribe(handler, port);
}
开发者ID:jimdowling,项目名称:nat-traverser,代码行数:5,代码来源:MsgRetryComponent.java
示例7: getNegative
import se.sics.kompics.PortType; //导入依赖的package包/类
@Override
public <P extends PortType> Negative<P> getNegative(Class<P> portType) {
return negative(portType);
}
开发者ID:jimdowling,项目名称:nat-traverser,代码行数:5,代码来源:MsgRetryComponent.java
示例8: getPositive
import se.sics.kompics.PortType; //导入依赖的package包/类
@Override
public <P extends PortType> Positive<P> getPositive(Class<P> portType) {
return positive(portType);
}
开发者ID:jimdowling,项目名称:nat-traverser,代码行数:5,代码来源:MsgRetryComponent.java
示例9: doConnect
import se.sics.kompics.PortType; //导入依赖的package包/类
@Override
public <P extends PortType> Channel<P> doConnect(
Positive<P> positive, Negative<P> negative) {
return connect(positive, negative);
}
开发者ID:jimdowling,项目名称:nat-traverser,代码行数:6,代码来源:MsgRetryComponent.java
示例10: doDisconnect
import se.sics.kompics.PortType; //导入依赖的package包/类
@Override
public <P extends PortType> void doDisconnect(Negative<P> negative,
Positive<P> positive) {
// TODO - tell cosmin that disconnect should return a portType
disconnect(negative, positive);
}
开发者ID:jimdowling,项目名称:nat-traverser,代码行数:7,代码来源:MsgRetryComponent.java
示例11: doConnect
import se.sics.kompics.PortType; //导入依赖的package包/类
public <P extends PortType> Channel<P> doConnect(
Positive<P> positive, Negative<P> negative);
开发者ID:jimdowling,项目名称:nat-traverser,代码行数:3,代码来源:ComponentDelegator.java
示例12: doDisconnect
import se.sics.kompics.PortType; //导入依赖的package包/类
public <P extends PortType> void doDisconnect(Negative<P> negative,
Positive<P> positive);
开发者ID:jimdowling,项目名称:nat-traverser,代码行数:3,代码来源:ComponentDelegator.java
示例13: doSubscribe
import se.sics.kompics.PortType; //导入依赖的package包/类
@Override
public <E extends KompicsEvent, P extends PortType> void doSubscribe(Handler<E> handler, Port<P> port) {
}
开发者ID:jimdowling,项目名称:nat-traverser,代码行数:4,代码来源:VodComponentTestCase.java
示例14: getNegative
import se.sics.kompics.PortType; //导入依赖的package包/类
@Override
public <P extends PortType> Negative<P> getNegative(Class<P> portType) {
return null;
}
开发者ID:jimdowling,项目名称:nat-traverser,代码行数:5,代码来源:VodComponentTestCase.java
示例15: getPositive
import se.sics.kompics.PortType; //导入依赖的package包/类
@Override
public <P extends PortType> Positive<P> getPositive(Class<P> portType) {
return null;
}
开发者ID:jimdowling,项目名称:nat-traverser,代码行数:5,代码来源:VodComponentTestCase.java
示例16: doConnect
import se.sics.kompics.PortType; //导入依赖的package包/类
@Override
public <P extends PortType> Channel<P> doConnect(
Positive<P> positive, Negative<P> negative) {
return null;
}
开发者ID:jimdowling,项目名称:nat-traverser,代码行数:6,代码来源:VodComponentTestCase.java
示例17: doDisconnect
import se.sics.kompics.PortType; //导入依赖的package包/类
@Override
public <P extends PortType> void doDisconnect(Negative<P> negative,
Positive<P> positive) {
// TODO - tell cosmin that disconnect should return a portType
return;
}
开发者ID:jimdowling,项目名称:nat-traverser,代码行数:7,代码来源:VodComponentTestCase.java
示例18: trigger
import se.sics.kompics.PortType; //导入依赖的package包/类
@Override
public <P extends PortType> void trigger(Event e, Port<P> p) {
LauncherComponent.this.trigger(e, p);
}
开发者ID:kompics,项目名称:kompics,代码行数:5,代码来源:NetworkTest.java
示例19: connect
import se.sics.kompics.PortType; //导入依赖的package包/类
@Override
public <P extends PortType> Channel<P> connect(Positive<P> positive, Negative<P> negative) {
return LauncherComponent.this.connect(positive, negative);
}
开发者ID:kompics,项目名称:kompics,代码行数:5,代码来源:NetworkTest.java
示例20: disconnect
import se.sics.kompics.PortType; //导入依赖的package包/类
@Override
public <P extends PortType> void disconnect(Negative<P> negative, Positive<P> positive) {
LauncherComponent.this.disconnect(negative, positive);
}
开发者ID:kompics,项目名称:kompics,代码行数:5,代码来源:NetworkTest.java
注:本文中的se.sics.kompics.PortType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论