com.dragome.forms.bindings.client.command.SendToBuilderImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dragome-form-bindings Show documentation
Show all versions of dragome-form-bindings Show documentation
Dragome SDK module: form bindings
package com.dragome.forms.bindings.client.command;
import com.dragome.forms.bindings.client.binding.Disposable;
import com.dragome.forms.bindings.client.channel.Channel;
import com.dragome.forms.bindings.client.channel.Destination;
import com.dragome.forms.bindings.client.channel.Publisher;
import com.dragome.forms.bindings.client.value.ValueTarget;
/**
* Created by IntelliJ IDEA.
* User: andrew
* Date: Mar 6, 2010
* Time: 1:01:25 PM
* To change this template use File | Settings | File Templates.
*/
public class SendToBuilderImpl implements SendToBuilder
{
private Channel> trigger;
private T value;
SendToBuilderImpl(Channel> trigger, T value)
{
this.trigger= trigger;
this.value= value;
}
public Disposable to(final Destination super T> destination)
{
if (destination == null)
{
throw new NullPointerException("destination is null");
}
return trigger.sendTo(new Destination