mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-04-01 00:35:29 +02:00
28 lines
651 B
Java
28 lines
651 B
Java
package com.minelittlepony.jumpingcastle.api;
|
|
|
|
/**
|
|
* Jumping Castle main interface.
|
|
* <p>
|
|
*{@code
|
|
* JumpingCastle.listen("My Channel").consume(MyMessage.class, (msg, channel) -> {
|
|
* ...
|
|
* });
|
|
*
|
|
*/
|
|
public interface JumpingCastle {
|
|
/**
|
|
* Gets or creates a new channel indexed by the given identifier.
|
|
*
|
|
* @param channelName The channel name
|
|
*
|
|
* @return An instance of IChannel.
|
|
*/
|
|
static Channel subscribeTo(String channelName, Client clientHandler) {
|
|
return null;// TODO: JumpingFabric
|
|
}
|
|
|
|
@FunctionalInterface
|
|
public interface Client {
|
|
void connectionEstablished();
|
|
}
|
|
}
|