Package com.yahoo.messagebus
Class DestinationSessionParams
- java.lang.Object
-
- com.yahoo.messagebus.DestinationSessionParams
-
public class DestinationSessionParams extends java.lang.Object
To facilitate several configuration parameters to theMessageBus.createDestinationSession(DestinationSessionParams)
, all parameters are held by this class. This class has reasonable default values for each parameter.- Author:
- Simon Thoresen Hult
-
-
Constructor Summary
Constructors Constructor Description DestinationSessionParams()
Constructs a new instance of this class with default values.DestinationSessionParams(DestinationSessionParams params)
Implements the copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getBroadcastName()
Returns whether or not to broadcast the name of this session on the network.MessageHandler
getMessageHandler()
Returns the handler to receive incoming messages.java.lang.String
getName()
Returns the name to register with message bus.DestinationSessionParams
setBroadcastName(boolean broadcastName)
Sets whether or not to broadcast the name of this session on the network.DestinationSessionParams
setMessageHandler(MessageHandler handler)
Sets the handler to recive incoming messages.DestinationSessionParams
setName(java.lang.String name)
Sets the name to register with message bus.
-
-
-
Constructor Detail
-
DestinationSessionParams
public DestinationSessionParams()
Constructs a new instance of this class with default values.
-
DestinationSessionParams
public DestinationSessionParams(DestinationSessionParams params)
Implements the copy constructor.- Parameters:
params
- The object to copy.
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name to register with message bus.- Returns:
- The name.
-
setName
public DestinationSessionParams setName(java.lang.String name)
Sets the name to register with message bus.- Parameters:
name
- The name to set.- Returns:
- This, to allow chaining.
-
getBroadcastName
public boolean getBroadcastName()
Returns whether or not to broadcast the name of this session on the network.- Returns:
- True to broadcast, false otherwise.
-
setBroadcastName
public DestinationSessionParams setBroadcastName(boolean broadcastName)
Sets whether or not to broadcast the name of this session on the network.- Parameters:
broadcastName
- True to broadcast, false otherwise.- Returns:
- This, to allow chaining.
-
getMessageHandler
public MessageHandler getMessageHandler()
Returns the handler to receive incoming messages.- Returns:
- The handler.
-
setMessageHandler
public DestinationSessionParams setMessageHandler(MessageHandler handler)
Sets the handler to recive incoming messages.- Parameters:
handler
- The handler to set.- Returns:
- This, to allow chaining.
-
-