Skip to main content

sow-and-sub-filter

Import the basic AMPS library:

import com.crankuptheamps.client.*;
import com.crankuptheamps.client.exception.*;

Constructing the command:

Command cmd = new Command(Message.Command.SOWAndSubscribe);

// set the topic and filter on the command
cmd.setTopic(topic).setFilter("/id > 1"); // Submit filter as string

The command can now be used in execute or executeAsync.