Package de.dytanic.cloudnet.cluster
Class DefaultClusterNodeServer
- java.lang.Object
-
- de.dytanic.cloudnet.cluster.DefaultNodeServer
-
- de.dytanic.cloudnet.cluster.DefaultClusterNodeServer
-
- All Implemented Interfaces:
IClusterNodeServer,NodeServer,de.dytanic.cloudnet.driver.api.DriverAPIUser,java.lang.AutoCloseable
public class DefaultClusterNodeServer extends DefaultNodeServer implements IClusterNodeServer, de.dytanic.cloudnet.driver.api.DriverAPIUser
-
-
Field Summary
-
Fields inherited from class de.dytanic.cloudnet.cluster.DefaultNodeServer
currentSnapshot, lastSnapshot, nodeInfo
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDefaultClusterNodeServer(DefaultClusterNodeServerProvider provider, de.dytanic.cloudnet.driver.network.cluster.NetworkClusterNode nodeInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()de.dytanic.cloudnet.driver.network.INetworkChannelgetChannel()@NotNull de.dytanic.cloudnet.driver.provider.service.CloudServiceFactorygetCloudServiceFactory()de.dytanic.cloudnet.driver.provider.service.SpecificCloudServiceProvidergetCloudServiceProvider(@NotNull de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot serviceInfoSnapshot)de.dytanic.cloudnet.driver.network.INetworkChannelgetNetworkChannel()@NotNull DefaultClusterNodeServerProvidergetProvider()booleanisAcceptableConnection(@NotNull de.dytanic.cloudnet.driver.network.INetworkChannel channel, @NotNull java.lang.String nodeId)booleanisConnected()voidsaveSendPacket(@NotNull de.dytanic.cloudnet.driver.network.protocol.IPacket packet)voidsaveSendPacketSync(@NotNull de.dytanic.cloudnet.driver.network.protocol.IPacket packet)java.lang.String[]sendCommandLine(@NotNull java.lang.String commandLine)voidsendCustomChannelMessage(@NotNull de.dytanic.cloudnet.driver.channel.ChannelMessage channelMessage)voidsendCustomChannelMessage(@NotNull java.lang.String channel, @NotNull java.lang.String message, @NotNull de.dytanic.cloudnet.common.document.gson.JsonDocument data)voidsetChannel(@NotNull de.dytanic.cloudnet.driver.network.INetworkChannel channel)voidsetNodeInfoSnapshot(@NotNull de.dytanic.cloudnet.driver.network.cluster.NetworkClusterNodeInfoSnapshot nodeInfoSnapshot)-
Methods inherited from class de.dytanic.cloudnet.cluster.DefaultNodeServer
getLastNodeInfoSnapshot, getNodeInfo, getNodeInfoSnapshot, isHeadNode, setNodeInfo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.dytanic.cloudnet.driver.api.DriverAPIUser
executeChunkedDriverAPIMethod, executeDriverAPIMethod, executeDriverAPIMethod, executeVoidDriverAPIMethod, executeVoidDriverAPIMethod
-
Methods inherited from interface de.dytanic.cloudnet.cluster.IClusterNodeServer
isAvailable
-
Methods inherited from interface de.dytanic.cloudnet.cluster.NodeServer
getLastNodeInfoSnapshot, getNodeInfo, getNodeInfoSnapshot, isHeadNode, setNodeInfo
-
-
-
-
Constructor Detail
-
DefaultClusterNodeServer
protected DefaultClusterNodeServer(DefaultClusterNodeServerProvider provider, de.dytanic.cloudnet.driver.network.cluster.NetworkClusterNode nodeInfo)
-
-
Method Detail
-
sendCustomChannelMessage
public void sendCustomChannelMessage(@NotNull @NotNull de.dytanic.cloudnet.driver.channel.ChannelMessage channelMessage)- Specified by:
sendCustomChannelMessagein interfaceIClusterNodeServer
-
sendCustomChannelMessage
public void sendCustomChannelMessage(@NotNull @NotNull java.lang.String channel, @NotNull @NotNull java.lang.String message, @NotNull @NotNull de.dytanic.cloudnet.common.document.gson.JsonDocument data)- Specified by:
sendCustomChannelMessagein interfaceIClusterNodeServer
-
isConnected
public boolean isConnected()
- Specified by:
isConnectedin interfaceIClusterNodeServer
-
saveSendPacket
public void saveSendPacket(@NotNull @NotNull de.dytanic.cloudnet.driver.network.protocol.IPacket packet)- Specified by:
saveSendPacketin interfaceIClusterNodeServer
-
saveSendPacketSync
public void saveSendPacketSync(@NotNull @NotNull de.dytanic.cloudnet.driver.network.protocol.IPacket packet)- Specified by:
saveSendPacketSyncin interfaceIClusterNodeServer
-
isAcceptableConnection
public boolean isAcceptableConnection(@NotNull @NotNull de.dytanic.cloudnet.driver.network.INetworkChannel channel, @NotNull @NotNull java.lang.String nodeId)- Specified by:
isAcceptableConnectionin interfaceIClusterNodeServer
-
sendCommandLine
public java.lang.String[] sendCommandLine(@NotNull @NotNull java.lang.String commandLine)- Specified by:
sendCommandLinein interfaceNodeServer
-
getCloudServiceFactory
@NotNull public @NotNull de.dytanic.cloudnet.driver.provider.service.CloudServiceFactory getCloudServiceFactory()
- Specified by:
getCloudServiceFactoryin interfaceNodeServer
-
getCloudServiceProvider
public de.dytanic.cloudnet.driver.provider.service.SpecificCloudServiceProvider getCloudServiceProvider(@NotNull @NotNull de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot serviceInfoSnapshot)- Specified by:
getCloudServiceProviderin interfaceNodeServer
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Overrides:
closein classDefaultNodeServer- Throws:
java.lang.Exception
-
getProvider
@NotNull public @NotNull DefaultClusterNodeServerProvider getProvider()
- Specified by:
getProviderin interfaceIClusterNodeServer- Specified by:
getProviderin interfaceNodeServer
-
getChannel
public de.dytanic.cloudnet.driver.network.INetworkChannel getChannel()
- Specified by:
getChannelin interfaceIClusterNodeServer
-
setChannel
public void setChannel(@NotNull @NotNull de.dytanic.cloudnet.driver.network.INetworkChannel channel)- Specified by:
setChannelin interfaceIClusterNodeServer
-
getNetworkChannel
public de.dytanic.cloudnet.driver.network.INetworkChannel getNetworkChannel()
- Specified by:
getNetworkChannelin interfacede.dytanic.cloudnet.driver.api.DriverAPIUser
-
setNodeInfoSnapshot
public void setNodeInfoSnapshot(@NotNull @NotNull de.dytanic.cloudnet.driver.network.cluster.NetworkClusterNodeInfoSnapshot nodeInfoSnapshot)- Specified by:
setNodeInfoSnapshotin interfaceNodeServer- Overrides:
setNodeInfoSnapshotin classDefaultNodeServer
-
-