Class MessagingServiceJmsSettings
- java.lang.Object
-
- com.sap.cloud.servicesdk.xbem.extension.sapcp.jms.MessagingServiceJmsSettings
-
- All Implemented Interfaces:
MessagingServiceConnectionSettings
public class MessagingServiceJmsSettings extends Object implements MessagingServiceConnectionSettings
Configuration of the JMS Connection Factory.
-
-
Constructor Summary
Constructors Constructor Description MessagingServiceJmsSettings()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object obj)longgetAmqpIdleTimeout()Supplier<String>getAuthenticationRequest()intgetFailoverInitialReconnectDelay()intgetFailoverMaxReconnectAttempts()intgetFailoverReconnectDelay()intgetInitialReconnectDelay()Deprecated.UsegetFailoverInitialReconnectDelay()instead.longgetJmsRequestTimeout()intgetMaxReconnectAttempts()Deprecated.UsegetFailoverMaxReconnectAttempts()instead.intgetReconnectDelay()Deprecated.UsegetFailoverReconnectDelay()instead.longgetRequestTimeout()Deprecated.UsegetJmsRequestTimeout()instead.inthashCode()booleanisAmqpTraceFrame()voidsetAmqpIdleTimeout(long amqpIdleTimeout)The idle timeout in milliseconds after which the connection will be failed if the peer sends no AMQP frames.voidsetAmqpTraceFrame(boolean amqpTraceFrame)Add the option amqp.traceFrames=true to your connection URI to have the client add a protocol tracer to Proton.voidsetAuthenticationRequest(Supplier<String> authenticationRequest)The provided authentication request will be executed before message will send to the server.This token is used for authentication.voidsetFailoverInitialReconnectDelay(int failoverInitialReconnectDelay)The amount of time the client will wait before the first attempt to reconnect to a remote peer.voidsetFailoverMaxReconnectAttempts(int failoverMaxReconnectAttempts)The number of reconnection attempts allowed before reporting the connection as failed to the client.voidsetFailoverReconnectDelay(int failoverReconnectDelay)Controls the delay between successive reconnection attempts, defaults to 3000 milliseconds.voidsetInitialReconnectDelay(int initialReconnectDelay)Deprecated.UsesetFailoverInitialReconnectDelay(int)instead.voidsetJmsRequestTimeout(long jmsRequestTimeout)Timeout value that controls how long the client waits on completion of various synchronous interactions, such as opening a producer or consumer, before returning an error.voidsetMaxReconnectAttempts(int maxReconnectAttempts)Deprecated.UsesetFailoverMaxReconnectAttempts(int)instead.voidsetReconnectDelay(int reconnectDelay)Deprecated.UsesetFailoverReconnectDelay(int)instead.voidsetRequestTimeout(long requestTimeout)Deprecated.UsesetJmsRequestTimeout(long)instead.StringtoString()
-
-
-
Method Detail
-
setMaxReconnectAttempts
@Deprecated public void setMaxReconnectAttempts(int maxReconnectAttempts)
Deprecated.Use
setFailoverMaxReconnectAttempts(int)instead.The number of reconnection attempts allowed before reporting the connection as failed to the client. The default is 20. Use -1 for no limit.- Parameters:
maxReconnectAttempts- amount of reconnect attempts
-
getMaxReconnectAttempts
@Deprecated public int getMaxReconnectAttempts()
Deprecated.Use
getFailoverMaxReconnectAttempts()instead.- Returns:
- the max failover attempts
-
setFailoverMaxReconnectAttempts
public void setFailoverMaxReconnectAttempts(int failoverMaxReconnectAttempts)
The number of reconnection attempts allowed before reporting the connection as failed to the client. The default is 20. Use -1 for no limit.- Parameters:
failoverMaxReconnectAttempts- amount of reconnect attempts
-
getFailoverMaxReconnectAttempts
public int getFailoverMaxReconnectAttempts()
-
setInitialReconnectDelay
@Deprecated public void setInitialReconnectDelay(int initialReconnectDelay)
Deprecated.Use
setFailoverInitialReconnectDelay(int)instead.The amount of time the client will wait before the first attempt to reconnect to a remote peer. The default value is 10000 milliseconds.- Parameters:
initialReconnectDelay- in milliseconds
-
getInitialReconnectDelay
@Deprecated public int getInitialReconnectDelay()
Deprecated.Use
getFailoverInitialReconnectDelay()instead.- Returns:
- the initial reconnect delay in milliseconds
-
setFailoverInitialReconnectDelay
public void setFailoverInitialReconnectDelay(int failoverInitialReconnectDelay)
The amount of time the client will wait before the first attempt to reconnect to a remote peer. The default value is 10000 milliseconds.- Parameters:
failoverInitialReconnectDelay- in milliseconds
-
getFailoverInitialReconnectDelay
public int getFailoverInitialReconnectDelay()
-
setReconnectDelay
@Deprecated public void setReconnectDelay(int reconnectDelay)
Deprecated.Use
setFailoverReconnectDelay(int)instead.Controls the delay between successive reconnection attempts, defaults to 3000 milliseconds.- Parameters:
reconnectDelay- in milliseconds
-
getReconnectDelay
@Deprecated public int getReconnectDelay()
Deprecated.Use
getFailoverReconnectDelay()instead.- Returns:
- the reconnect delay in milliseconds
-
setFailoverReconnectDelay
public void setFailoverReconnectDelay(int failoverReconnectDelay)
Controls the delay between successive reconnection attempts, defaults to 3000 milliseconds.- Parameters:
failoverReconnectDelay- in milliseconds
-
getFailoverReconnectDelay
public int getFailoverReconnectDelay()
-
getRequestTimeout
@Deprecated public long getRequestTimeout()
Deprecated.Use
getJmsRequestTimeout()instead.- Returns:
- the request timeout in milliseconds
-
getJmsRequestTimeout
public long getJmsRequestTimeout()
-
setRequestTimeout
@Deprecated public void setRequestTimeout(long requestTimeout)
Deprecated.Use
setJmsRequestTimeout(long)instead.Timeout value that controls how long the client waits on completion of various synchronous interactions, such as opening a producer or consumer, before returning an error. Does not affect synchronous message sends. Maximum timeout is 600000.- Parameters:
requestTimeout- in milliseconds
-
setJmsRequestTimeout
public void setJmsRequestTimeout(long jmsRequestTimeout)
Timeout value that controls how long the client waits on completion of various synchronous interactions, such as opening a producer or consumer, before returning an error. Does not affect synchronous message sends. Maximum timeout is 600000.- Parameters:
jmsRequestTimeout- in milliseconds
-
setAmqpIdleTimeout
public void setAmqpIdleTimeout(long amqpIdleTimeout)
The idle timeout in milliseconds after which the connection will be failed if the peer sends no AMQP frames. Default is -1 (no idle timeout).- Parameters:
amqpIdleTimeout- in milliseconds
-
getAmqpIdleTimeout
public long getAmqpIdleTimeout()
-
isAmqpTraceFrame
public boolean isAmqpTraceFrame()
-
setAuthenticationRequest
public void setAuthenticationRequest(Supplier<String> authenticationRequest)
The provided authentication request will be executed before message will send to the server.This token is used for authentication. The provided String should be the plain token, the EMJAPI lib will add the "Bearer " prefix. If not set the library will create the token with the provided event mesh bindings, client id and client secret.- Parameters:
authenticationRequest- the supplier will be invoked for authentication before request event-mesh server
-
setAmqpTraceFrame
public void setAmqpTraceFrame(boolean amqpTraceFrame)
Add the option amqp.traceFrames=true to your connection URI to have the client add a protocol tracer to Proton. Additionally, configure the org.apache.qpid.jms.provider.amqp.FRAMES Logger to TRACE level to include the output in your logs. Should only be used in case of debugging!- Parameters:
amqpTraceFrame- true if tracing should be enabled. Default: false
-
-