Compartir vía


FabricTransportRemotingListenerSettings Class

  • java.lang.Object
    • microsoft.servicefabric.services.remoting.fabrictransport.runtime.FabricTransportRemotingListenerSettings

public class FabricTransportRemotingListenerSettings

Settings that configures the FabricTransport Listener.

Constructor Summary

Constructor Description
FabricTransportRemotingListenerSettings()

Creates a new instance of FabricTransportRemotingListenerSettings and initializes properties with default Values.

Method Summary

Modifier and Type Method and Description
FabricTransportRemotingListenerSettings getDefault()
FabricTransportRemotingListenerSettings getDefault(String sectionName)
String getDefaultEndpointResourceName()
String getEndPointResourceName()

EndpointResourceName is name of the endpoint resource specified in ServiceManifest .This is used to obtain the port number on which to service will listen.

Remarks:Default value of EndpointResourceName is "ServiceEndpoint"

FabricTransportListenerSettings getInternalSettings()
Duration getKeepAliveTimeout()

KeepAliveTimeout is provides a way to configure Tcp keep-alive option.

Remarks:Default Value for KeepAliveTimeout Timeout is set as TimeSpan.Zero. which indicates we disable the tcp keepalive option. If you are using loadbalancer , you may need to configure this in order to avoid the loadbalancer to close the connection after certain time

Long getMaxConcurrentCalls()

MaxConcurrentCalls represents maximum number of messages actively service processes at one time.

Remarks:Defaults value for the MaxConcurrentCalls is to the Number of processors.

Long getMaxMessageSize()

MaxMessageSize represents the maximum size for a message that can be received on a channel configured with this setting.

Remarks:Default Value for MaxMessageSize used is 4194304 bytes

Long getMaxQueueSize()

The maximum size, of a queue that stores messages while they are processed for an endpoint configured with this setting.

Remarks:Default value is 10,000 messages

Duration getOperationTimeout()

Operation Timeout which governs the whole process of sending a message, including receiving a reply message for a request/reply service operation. This timeout also applies when sending reply messages from a callback contract method.

Remarks:Default Value for Operation Timeout is set as TimeSpan.MaxValue

SecurityCredentials getSecurityCredentials()

Security credentials for securing the communication

Remarks: Default Value for SecurityCredentials is NoneSecurityCredentials. Can be of type X509Credentials or X509Credentials2

FabricTransportRemotingListenerSettings loadFrom(String sectionName)

Loads the FabricTransport settings from a section specified in the service settings configuration file - settings.xml

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - FabricTransportSettings#getMaxQueueSize()value in long. 2. MaxMessageSize - FabricTransportSettings#getMaxMessageSize()value in bytes. 3. MaxConcurrentCalls - FabricTransportSettings#getMaxConcurrentCalls()value in long. 4. SecurityCredentials - FabricTransportSettings#getSecurityCredentials() value. 5. OperationTimeoutInSeconds - FabricTransportSettings#getOperationTimeout() value in seconds. 6. KeepAliveTimeoutInSeconds - FabricTransportSettings#getKeepAliveTimeout() value in seconds.

FabricTransportRemotingListenerSettings loadFrom(String sectionName, String configPackageName)

Loads the FabricTransport settings from a section specified in the service settings configuration file - settings.xml

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - FabricTransportSettings#getMaxQueueSize()value in long. 2. MaxMessageSize - FabricTransportSettings#getMaxMessageSize()value in bytes. 3. MaxConcurrentCalls - FabricTransportSettings#getMaxConcurrentCalls()value in long. 4. SecurityCredentials - FabricTransportSettings#getSecurityCredentials() value. 5. OperationTimeoutInSeconds - FabricTransportSettings#getOperationTimeout() value in seconds. 6. KeepAliveTimeoutInSeconds - FabricTransportSettings#getKeepAliveTimeout() value in seconds.

void setEndPointResourceName(String endPointResourceName)

EndpointResourceName is name of the endpoint resource specified in ServiceManifest .This is used to obtain the port number on which to service will listen.

Remarks:Default value of EndpointResourceName is "ServiceEndpoint"

void setKeepAliveTimeout(Duration keepAliveTimeout)

KeepAliveTimeout is provides a way to configure Tcp keep-alive option.

Remarks:Default Value for KeepAliveTimeout Timeout is set as TimeSpan.Zero. which indicates we disable the tcp keepalive option. If you are using loadbalancer , you may need to configure this in order to avoid the loadbalancer to close the connection after certain time

void setMaxConcurrentCalls(Long maxConcurrentCalls)

MaxConcurrentCalls represents maximum number of messages actively service processes at one time.

Remarks:Defaults value for the MaxConcurrentCalls is to the Number of processors.

void setMaxMessageSize(Long maxMessageSize)

MaxMessageSize represents the maximum size for a message that can be received on a channel configured with this setting.

Remarks:Default Value for MaxMessageSize used is 4194304 bytes

void setMaxQueueSize(Long maxQueueSize)

The maximum size, of a queue that stores messages while they are processed for an endpoint configured with this setting.

Remarks:Default value is 10,000 messages

void setOperationTimeout(Duration operationTimeout)

Operation Timeout which governs the whole process of sending a message, including receiving a reply message for a request/reply service operation. This timeout also applies when sending reply messages from a callback contract method.

Remarks:Default Value for Operation Timeout is set as TimeSpan.MaxValue

void setSecurityCredentials(SecurityCredentials securityCredentials)

Security credentials for securing the communication

FabricTransportRemotingListenerSettings tryLoadFrom(String sectionName)

Try to load the FabricTransport settings from a section specified in the service settings configuration file - settings.xml

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - FabricTransportSettings#getMaxQueueSize()value in long. 2. MaxMessageSize - FabricTransportSettings#getMaxMessageSize()value in bytes. 3. MaxConcurrentCalls - FabricTransportSettings#getMaxConcurrentCalls()value in long. 4. SecurityCredentials - FabricTransportSettings#getSecurityCredentials() value. 5. OperationTimeoutInSeconds - FabricTransportSettings#getOperationTimeout() value in seconds. 6. KeepAliveTimeoutInSeconds - FabricTransportSettings#getKeepAliveTimeout() value in seconds.

FabricTransportRemotingListenerSettings tryLoadFrom(String sectionName, String configPackageName)

Try to load the FabricTransport settings from a section specified in the service settings configuration file - settings.xml

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - FabricTransportSettings#getMaxQueueSize()value in long. 2. MaxMessageSize - FabricTransportSettings#getMaxMessageSize()value in bytes. 3. MaxConcurrentCalls - FabricTransportSettings#getMaxConcurrentCalls()value in long. 4. SecurityCredentials - FabricTransportSettings#getSecurityCredentials() value. 5. OperationTimeoutInSeconds - FabricTransportSettings#getOperationTimeout() value in seconds. 6. KeepAliveTimeoutInSeconds - FabricTransportSettings#getKeepAliveTimeout() value in seconds.

Constructor Details

FabricTransportRemotingListenerSettings

public FabricTransportRemotingListenerSettings()

Creates a new instance of FabricTransportRemotingListenerSettings and initializes properties with default Values.

Method Details

getDefault

public static FabricTransportRemotingListenerSettings getDefault()

getDefault

public static FabricTransportRemotingListenerSettings getDefault(String sectionName)

Parameters:

sectionName

getDefaultEndpointResourceName

public static String getDefaultEndpointResourceName()

getEndPointResourceName

public String getEndPointResourceName()

EndpointResourceName is name of the endpoint resource specified in ServiceManifest .This is used to obtain the port number on which to service will listen.

Remarks:Default value of EndpointResourceName is "ServiceEndpoint"

Returns:

EndpointResourceName is name of the endpoint resource defined in the service manifest.

getInternalSettings

public FabricTransportListenerSettings getInternalSettings()

getKeepAliveTimeout

public Duration getKeepAliveTimeout()

KeepAliveTimeout is provides a way to configure Tcp keep-alive option.

Remarks:Default Value for KeepAliveTimeout Timeout is set as TimeSpan.Zero. which indicates we disable the tcp keepalive option. If you are using loadbalancer , you may need to configure this in order to avoid the loadbalancer to close the connection after certain time

Returns:

KeepAliveTimeout as java.time.Duration

getMaxConcurrentCalls

public Long getMaxConcurrentCalls()

MaxConcurrentCalls represents maximum number of messages actively service processes at one time.

Remarks:Defaults value for the MaxConcurrentCalls is to the Number of processors.

Returns:

MaxConcurrentCalls is the upper limit of active messages in the service.

getMaxMessageSize

public Long getMaxMessageSize()

MaxMessageSize represents the maximum size for a message that can be received on a channel configured with this setting.

Remarks:Default Value for MaxMessageSize used is 4194304 bytes

Returns:

Maximum size of the message in bytes.

getMaxQueueSize

public Long getMaxQueueSize()

The maximum size, of a queue that stores messages while they are processed for an endpoint configured with this setting.

Remarks:Default value is 10,000 messages

Returns:

Max Size for a Queue that recieves messages from the channel

getOperationTimeout

public Duration getOperationTimeout()

Operation Timeout which governs the whole process of sending a message, including receiving a reply message for a request/reply service operation. This timeout also applies when sending reply messages from a callback contract method.

Remarks:Default Value for Operation Timeout is set as TimeSpan.MaxValue

Returns:

OperationTimeout as java.time.Duration

getSecurityCredentials

public SecurityCredentials getSecurityCredentials()

Security credentials for securing the communication

Remarks: Default Value for SecurityCredentials is NoneSecurityCredentials. Can be of type X509Credentials or X509Credentials2

Returns:

SecurityCredentials as SecurityCredentials

loadFrom

public static FabricTransportRemotingListenerSettings loadFrom(String sectionName)

Loads the FabricTransport settings from a section specified in the service settings configuration file - settings.xml

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - FabricTransportSettings#getMaxQueueSize()value in long. 2. MaxMessageSize - FabricTransportSettings#getMaxMessageSize()value in bytes. 3. MaxConcurrentCalls - FabricTransportSettings#getMaxConcurrentCalls()value in long. 4. SecurityCredentials - FabricTransportSettings#getSecurityCredentials() value. 5. OperationTimeoutInSeconds - FabricTransportSettings#getOperationTimeout() value in seconds. 6. KeepAliveTimeoutInSeconds - FabricTransportSettings#getKeepAliveTimeout() value in seconds.

Parameters:

sectionName - Name of the section within the configuration file. if not found , it throws ArgumentException. If not specified, default name is "Config"

Returns:

FabricTransportListenerSettings

loadFrom

public static FabricTransportRemotingListenerSettings loadFrom(String sectionName, String configPackageName)

Loads the FabricTransport settings from a section specified in the service settings configuration file - settings.xml

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - FabricTransportSettings#getMaxQueueSize()value in long. 2. MaxMessageSize - FabricTransportSettings#getMaxMessageSize()value in bytes. 3. MaxConcurrentCalls - FabricTransportSettings#getMaxConcurrentCalls()value in long. 4. SecurityCredentials - FabricTransportSettings#getSecurityCredentials() value. 5. OperationTimeoutInSeconds - FabricTransportSettings#getOperationTimeout() value in seconds. 6. KeepAliveTimeoutInSeconds - FabricTransportSettings#getKeepAliveTimeout() value in seconds.

Parameters:

sectionName - Name of the section within the configuration file. if not found , it throws ArgumentException.
configPackageName - Name of the configuration package. if not found Settings.xml in the configuration package path, it throws ArgumentException. If not specified, default name is "Config"

Returns:

FabricTransportListenerSettings

setEndPointResourceName

public void setEndPointResourceName(String endPointResourceName)

EndpointResourceName is name of the endpoint resource specified in ServiceManifest .This is used to obtain the port number on which to service will listen.

Remarks:Default value of EndpointResourceName is "ServiceEndpoint"

Parameters:

endPointResourceName - EndpointResourceName is name of the endpoint resource defined in the service manifest.

setKeepAliveTimeout

public void setKeepAliveTimeout(Duration keepAliveTimeout)

KeepAliveTimeout is provides a way to configure Tcp keep-alive option.

Remarks:Default Value for KeepAliveTimeout Timeout is set as TimeSpan.Zero. which indicates we disable the tcp keepalive option. If you are using loadbalancer , you may need to configure this in order to avoid the loadbalancer to close the connection after certain time

Parameters:

keepAliveTimeout - KeepAliveTimeout as java.time.Duration

setMaxConcurrentCalls

public void setMaxConcurrentCalls(Long maxConcurrentCalls)

MaxConcurrentCalls represents maximum number of messages actively service processes at one time.

Remarks:Defaults value for the MaxConcurrentCalls is to the Number of processors.

Parameters:

maxConcurrentCalls - MaxConcurrentCalls is the upper limit of active messages in the service.

setMaxMessageSize

public void setMaxMessageSize(Long maxMessageSize)

MaxMessageSize represents the maximum size for a message that can be received on a channel configured with this setting.

Remarks:Default Value for MaxMessageSize used is 4194304 bytes

Parameters:

maxMessageSize - Maximum size of the message in bytes.

setMaxQueueSize

public void setMaxQueueSize(Long maxQueueSize)

The maximum size, of a queue that stores messages while they are processed for an endpoint configured with this setting.

Remarks:Default value is 10,000 messages

Parameters:

maxQueueSize - Max Size for a Queue that recieves messages from the channel

setOperationTimeout

public void setOperationTimeout(Duration operationTimeout)

Operation Timeout which governs the whole process of sending a message, including receiving a reply message for a request/reply service operation. This timeout also applies when sending reply messages from a callback contract method.

Remarks:Default Value for Operation Timeout is set as TimeSpan.MaxValue

Parameters:

operationTimeout - OperationTimeout as java.time.Duration

setSecurityCredentials

public void setSecurityCredentials(SecurityCredentials securityCredentials)

Security credentials for securing the communication

Parameters:

securityCredentials - SecurityCredentials as SecurityCredentials

tryLoadFrom

public static FabricTransportRemotingListenerSettings tryLoadFrom(String sectionName)

Try to load the FabricTransport settings from a section specified in the service settings configuration file - settings.xml

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - FabricTransportSettings#getMaxQueueSize()value in long. 2. MaxMessageSize - FabricTransportSettings#getMaxMessageSize()value in bytes. 3. MaxConcurrentCalls - FabricTransportSettings#getMaxConcurrentCalls()value in long. 4. SecurityCredentials - FabricTransportSettings#getSecurityCredentials() value. 5. OperationTimeoutInSeconds - FabricTransportSettings#getOperationTimeout() value in seconds. 6. KeepAliveTimeoutInSeconds - FabricTransportSettings#getKeepAliveTimeout() value in seconds.

Parameters:

sectionName - Name of the section within the configuration file. if not found , it return false If not specified, default name is "Config"

Returns:

Boolean specifies whether the settings get loaded successfully from Config. It returns true when load from Config succeeded, else return false.

tryLoadFrom

public static FabricTransportRemotingListenerSettings tryLoadFrom(String sectionName, String configPackageName)

Try to load the FabricTransport settings from a section specified in the service settings configuration file - settings.xml

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - FabricTransportSettings#getMaxQueueSize()value in long. 2. MaxMessageSize - FabricTransportSettings#getMaxMessageSize()value in bytes. 3. MaxConcurrentCalls - FabricTransportSettings#getMaxConcurrentCalls()value in long. 4. SecurityCredentials - FabricTransportSettings#getSecurityCredentials() value. 5. OperationTimeoutInSeconds - FabricTransportSettings#getOperationTimeout() value in seconds. 6. KeepAliveTimeoutInSeconds - FabricTransportSettings#getKeepAliveTimeout() value in seconds.

Parameters:

sectionName - Name of the section within the configuration file. if not found , it return false
configPackageName - Name of the configuration package. if not found Settings.xml in the configuration package path, it return false. If not specified, default name is "Config"

Returns:

Boolean specifies whether the settings get loaded successfully from Config. It returns true when load from Config succeeded, else return false.

Applies to