private DestinationSessionParams createDestinationParams(MessageHandler messageHandler, String visitorName) { DestinationSessionParams destparams = new DestinationSessionParams(); destparams.setName(visitorName); destparams.setBroadcastName(false); destparams.setMessageHandler(messageHandler); return destparams; }
/** * <p>This is a convenience method to call {@link * #createDestinationSession(DestinationSessionParams)} with default values * for the {@link DestinationSessionParams} object.</p> * * @param name The local unique name for the created session. * @param broadcastName Whether or not to broadcast this session's name on * the network. * @param handler The handler to receive the messages for the session. * @return The created session. */ public DestinationSession createDestinationSession(String name, boolean broadcastName, MessageHandler handler) { return createDestinationSession( new DestinationSessionParams() .setName(name) .setBroadcastName(broadcastName) .setMessageHandler(handler)); }