com.e1.mxdublin
Class Sender

java.lang.Object
  extended by com.e1.mxdublin.Sender

public class Sender
extends Object

Class that acts like MaxObject Sender 's'. The send/sendto message will send the atom to a PD/Max receiver. The factory can be used to always return the same instance based upon name.


Field Summary
protected  String name
          The sender name.
 
Method Summary
 boolean equals(Object o)
           
static Sender factory(String name)
          Return same sender based on name.
 String getName()
          Returns sender name.
 void rename(String newName)
          Rename the sender and will update the factory reference.
 boolean send()
          Sends 'bang' to the receiver
 boolean send(Atom atom)
          Sends the atom with specified value to the receiver.
 boolean send(Atom[] list)
          Sends 'list' with specified value to the receiver.
 boolean send(PyObject pyobj)
          Sends a 'list' from python value.
 boolean send(String msg, Atom[] args)
          Sends a message with specified value to the receiver
static boolean sendto(String obj)
          Sends 'bang' to the receiver.
static boolean sendto(String obj, Atom event)
          Sends a atom the to receiver.
static boolean sendto(String obj, float i)
          Sends 'float' with specified value to the receiver.
static boolean sendto(String obj, int i)
          Sends 'int' with specified value to the receiver.
static boolean sendto(String obj, String msg)
          Sends a message to the receiver.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected String name
The sender name.

Method Detail

send

public boolean send()
Sends 'bang' to the receiver


send

public boolean send(Atom atom)
Sends the atom with specified value to the receiver.

Parameters:
atom - the atom value
Returns:
return code from MaxSystem

send

public boolean send(Atom[] list)
Sends 'list' with specified value to the receiver.

Parameters:
list - the list of atom to send
Returns:
return code from MaxSystem

send

public boolean send(String msg,
                    Atom[] args)
Sends a message with specified value to the receiver

Parameters:
msg - the message to send
args - arguments to the message
Returns:
return code from MaxSystem

send

public boolean send(PyObject pyobj)
Sends a 'list' from python value.

Parameters:
pyobj - python value
Returns:
return code from MaxSystem

sendto

public static boolean sendto(String obj)
Sends 'bang' to the receiver.

Parameters:
obj - the receiver name

sendto

public static boolean sendto(String obj,
                             int i)
Sends 'int' with specified value to the receiver.

Parameters:
obj - the receiver name
i - the integer value to send
Returns:
return code from MaxSystem

sendto

public static boolean sendto(String obj,
                             float i)
Sends 'float' with specified value to the receiver.

Parameters:
i - the float value to send
Returns:
return code from MaxSystem

sendto

public static boolean sendto(String obj,
                             String msg)
Sends a message to the receiver.

Parameters:
obj - the receiver name
msg - message to send
Returns:
return code from MaxSystem

sendto

public static boolean sendto(String obj,
                             Atom event)
Sends a atom the to receiver.

Parameters:
obj - the receiver name
event - the atom to send

getName

public String getName()
Returns sender name.

Returns:
sender name

rename

public void rename(String newName)
Rename the sender and will update the factory reference.

Parameters:
newName - the new destination name of the sender

factory

public static Sender factory(String name)
Return same sender based on name.

Parameters:
name - the name of the sender
Returns:
the sender instance

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object