本文整理匯總了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();
}
示例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);
}
示例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;
}
示例4: bind
import com.joepritzel.feather.PSBroker; //導入依賴的package包/類
@Override
public void bind(PSBroker broker) {
broker.subscribe(new ExitConsoleCommandSubscriber());
}
示例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.
}
示例6: CommandInputReaderService
import com.joepritzel.feather.PSBroker; //導入依賴的package包/類
public CommandInputReaderService(PSBroker broker) {
this.broker = broker;
broker.subscribe(new ConsoleCommandParser(broker));
}
示例7: NetworkingService
import com.joepritzel.feather.PSBroker; //導入依賴的package包/類
public NetworkingService(PSBroker broker) {
this.broker = broker;
}
示例8: ConsoleCommandParser
import com.joepritzel.feather.PSBroker; //導入依賴的package包/類
public ConsoleCommandParser(PSBroker broker) {
this.broker = broker;
}
示例9: getBroker
import com.joepritzel.feather.PSBroker; //導入依賴的package包/類
/**
* Returns the PSBroker that is used internally by this Server.
*/
public PSBroker getBroker() {
return broker;
}
示例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;
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}