当前位置: 首页>>代码示例>>Java>>正文


Java PSBroker类代码示例

本文整理汇总了Java中com.joepritzel.feather.PSBroker的典型用法代码示例。如果您正苦于以下问题:Java PSBroker类的具体用法?Java PSBroker怎么用?Java PSBroker使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PSBroker类属于com.joepritzel.feather包,在下文中一共展示了PSBroker类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import com.joepritzel.feather.PSBroker; //导入依赖的package包/类
public static void main(String[] args) {
	final PSBroker broker = new PSBrokerBuilder().build();
	
	new ConsoleCommandModule().bind(broker);
	new NetworkingModule().bind(broker);
	
	new NetworkingService(broker).start();
	new CommandInputReaderService(broker).start();
}
 
开发者ID:Joe0,项目名称:Pub-Sub-RSC,代码行数:10,代码来源:Server.java

示例2: JSONDecoder

import com.joepritzel.feather.PSBroker; //导入依赖的package包/类
/**
 * Creates a new JSONDecoder with the given PSBroker.
 * 
 * @param broker
 *            - The PSBroker to use.
 */
public JSONDecoder(PSBroker broker, NetworkingImplementation netImpl) {
	this.broker = broker;
	this.netImpl = netImpl;
	broker.subscribe(new JSONDecoderRegisterReader(),
			JSONDecoderRegister.class);
	netImpl.addTypes(classTypeList);
	classTypeList.add(IDAlreadyConnectedException.class);
}
 
开发者ID:Joe0,项目名称:TauNet,代码行数:15,代码来源:JSONDecoder.java

示例3: setPSBroker

import com.joepritzel.feather.PSBroker; //导入依赖的package包/类
@Override
public void setPSBroker(PSBroker broker) {
	if (f != null) {
		throw new IllegalStateException(
				"Can not change PSBroker once running.");
	}
	this.broker = broker;
}
 
开发者ID:Joe0,项目名称:TauNet,代码行数:9,代码来源:NettyTCPServerImplementation.java

示例4: bind

import com.joepritzel.feather.PSBroker; //导入依赖的package包/类
@Override
public void bind(PSBroker broker) {
	broker.subscribe(new ExitConsoleCommandSubscriber());
}
 
开发者ID:Joe0,项目名称:Pub-Sub-RSC,代码行数:5,代码来源:ConsoleCommandModule.java

示例5: bind

import com.joepritzel.feather.PSBroker; //导入依赖的package包/类
@Override
public void bind(PSBroker broker) {
	// Add predicated subscribers that listen for packets with particular ids and then transform them to correct usable.
}
 
开发者ID:Joe0,项目名称:Pub-Sub-RSC,代码行数:5,代码来源:NetworkingModule.java

示例6: CommandInputReaderService

import com.joepritzel.feather.PSBroker; //导入依赖的package包/类
public CommandInputReaderService(PSBroker broker) {
	this.broker = broker;
	broker.subscribe(new ConsoleCommandParser(broker));
}
 
开发者ID:Joe0,项目名称:Pub-Sub-RSC,代码行数:5,代码来源:CommandInputReaderService.java

示例7: NetworkingService

import com.joepritzel.feather.PSBroker; //导入依赖的package包/类
public NetworkingService(PSBroker broker) {
	this.broker = broker;
}
 
开发者ID:Joe0,项目名称:Pub-Sub-RSC,代码行数:4,代码来源:NetworkingService.java

示例8: ConsoleCommandParser

import com.joepritzel.feather.PSBroker; //导入依赖的package包/类
public ConsoleCommandParser(PSBroker broker) {
	this.broker = broker;
}
 
开发者ID:Joe0,项目名称:Pub-Sub-RSC,代码行数:4,代码来源:ConsoleCommandParser.java

示例9: getBroker

import com.joepritzel.feather.PSBroker; //导入依赖的package包/类
/**
 * Returns the PSBroker that is used internally by this Server.
 */
public PSBroker getBroker() {
	return broker;
}
 
开发者ID:Joe0,项目名称:TauNet,代码行数:7,代码来源:Server.java

示例10: RequestSubscriber

import com.joepritzel.feather.PSBroker; //导入依赖的package包/类
/**
 * Creates a new RequestSubscriber with the given PSBroker,
 * NetworkingImplementation, and QuoteFinder.
 * 
 * @param broker
 *            - The PSBroker to use.
 * @param netImpl
 *            - The NetworkingImplementation to use.
 * @param quoteFinder
 *            - The QuoteFinder to use.
 */
public RequestSubscriber(PSBroker broker, NetworkingImplementation netImpl,
		QuoteFinder quoteFinder) {
	this.broker = broker;
	this.netImpl = netImpl;
	this.quoteFinder = quoteFinder;
}
 
开发者ID:Joe0,项目名称:TauNet,代码行数:18,代码来源:RequestSubscriber.java

示例11: Server

import com.joepritzel.feather.PSBroker; //导入依赖的package包/类
/**
 * Creates a Server object.
 * 
 * @param netImpl
 *            - The NetworkingImplementation to use.
 * @param broker
 *            - The PSBroker to use.
 */
Server(NetworkingImplementation netImpl, PSBroker broker) {
	this.netImpl = netImpl;
	this.broker = broker;
	this.netImpl.setPSBroker(broker);
	this.decoder = new JSONDecoder(this.broker, this.netImpl);
	this.broker.subscribe(decoder, JSONToObject.class);
}
 
开发者ID:Joe0,项目名称:TauNet,代码行数:16,代码来源:Server.java

示例12: Client

import com.joepritzel.feather.PSBroker; //导入依赖的package包/类
/**
 * Creates a Client object.
 * 
 * @param netImpl
 *            - The NetworkingImplementation to use.
 * @param broker
 *            - The PSBroker to use.
 */
Client(NetworkingImplementation netImpl, PSBroker broker) {
	this.netImpl = netImpl;
	this.broker = broker;
	this.netImpl.setPSBroker(broker);
	this.decoder = new JSONDecoder(this.broker, this.netImpl);
	this.broker.subscribe(decoder, JSONToObject.class);
}
 
开发者ID:Joe0,项目名称:TauNet,代码行数:16,代码来源:Client.java

示例13: StringReader

import com.joepritzel.feather.PSBroker; //导入依赖的package包/类
/**
 * Creates a new StringReader subscriber.
 * 
 * @param broker
 *            - The broker that is being used.
 * @param netImpl
 *            - The NetworkingImplementation that is being used.
 */
public StringReader(PSBroker broker, NetworkingImplementation netImpl) {
	this.broker = broker;
	this.netImpl = netImpl;
}
 
开发者ID:Joe0,项目名称:TauNet,代码行数:13,代码来源:StringReader.java

示例14: StringSubscriber

import com.joepritzel.feather.PSBroker; //导入依赖的package包/类
/**
 * Creates a new StringSubscriber using the given broker and name.
 * 
 * @param broker
 *            - The PSBroker this application uses.
 * @param name
 *            - The name of this client.
 */
public StringSubscriber(PSBroker broker, String name) {
	this.broker = broker;
	this.name = name;
}
 
开发者ID:Joe0,项目名称:TauNet,代码行数:13,代码来源:StringSubscriber.java

示例15: setBroker

import com.joepritzel.feather.PSBroker; //导入依赖的package包/类
/**
 * Sets the PSBroker to use.
 * 
 * @param broker
 *            - The PSBroker to use.
 */
public void setBroker(PSBroker broker) {
	this.broker = broker;
}
 
开发者ID:Joe0,项目名称:TauNet,代码行数:10,代码来源:SubscriberHook.java


注:本文中的com.joepritzel.feather.PSBroker类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。