當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。