public class AbstractRedirectSystem extends Object implements RedirectSystem
RedirectSystem.ReceivedResponse, RedirectSystem.Request, RedirectSystem.RequestHandler, RedirectSystem.ResponseEMPTY| Constructor and Description |
|---|
AbstractRedirectSystem(Messenger messenger,
InstanceData instanceData,
PlayerRedirector redirector) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDefaultParameterProvider(RedirectParameterProvider provider)
Adds a default parameter provider.
|
void |
close()
Closes this resource.
|
int |
getExpectedConnectionsCount()
Gets the number of connections which have been allowed, but not yet fully established.
|
Promise<RedirectSystem.ReceivedResponse> |
redirectPlayer(String serverId,
Profile profile,
Map<String,String> params)
Makes a request to redirect the given player to the given server.
|
void |
setEnsure(boolean ensureJoinedViaQueue)
Sets if the system should ensure that incoming connections were made (and accepted) by the
redirect system.
|
void |
setHandler(RedirectSystem.RequestHandler handler)
Sets the
RedirectSystem.RequestHandler for this instance. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, create, obtain, redirectPlayerbindWith, closeAndReportException, closeSilently, isClosedpublic AbstractRedirectSystem(Messenger messenger, InstanceData instanceData, PlayerRedirector redirector)
public Promise<RedirectSystem.ReceivedResponse> redirectPlayer(@Nonnull String serverId, @Nonnull Profile profile, @Nonnull Map<String,String> params)
RedirectSystemredirectPlayer in interface RedirectSystemserverId - the server to redirect toprofile - the player to be redirectedparams - the parameters for the requestpublic void setHandler(@Nonnull RedirectSystem.RequestHandler handler)
RedirectSystemRedirectSystem.RequestHandler for this instance.setHandler in interface RedirectSystemhandler - the handlerpublic void addDefaultParameterProvider(@Nonnull RedirectParameterProvider provider)
RedirectSystemaddDefaultParameterProvider in interface RedirectSystemprovider - the providerpublic void setEnsure(boolean ensureJoinedViaQueue)
RedirectSystemsetEnsure in interface RedirectSystemensureJoinedViaQueue - if the system should ensure all joins are in the redirect queuepublic int getExpectedConnectionsCount()
RedirectSystemgetExpectedConnectionsCount in interface RedirectSystempublic void close()
Terminableclose in interface AutoCloseableclose in interface RedirectSystemclose in interface TerminableCopyright © 2022. All rights reserved.