|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jack4j.JackPort net.sf.jack4j.JackLocalPort
public class JackLocalPort
Port registered by JackClient
.
Method Summary | |
---|---|
int |
connected()
Returns number of connections to or from port. |
boolean |
connectedTo(java.lang.String portName)
Returns true if the port is directly connected to port with specified name. |
long |
getBufferPointer(int bufferSize)
Returns pointer to the memory area associated with the specified port. |
java.nio.ByteBuffer |
getByteBuffer(int bufferSize)
Returns ByteBuffer that contains the memory area associated with the specified port. |
JackClient |
getClient()
Returns the client that owns this port. |
java.lang.String[] |
getConnections()
Returns full port names of to which this port is connected. |
java.lang.String[] |
getPortAliases()
Returns all aliases set for this port. |
void |
setPortAlias(java.lang.String alias)
Sets port alias. |
void |
setPortName(java.lang.String portName)
Sets short name of this port. |
void |
tie(JackLocalPort sourcePort)
Ties this (output) port to given input port. |
void |
unsetPortAlias(java.lang.String alias)
Removes port alias. |
void |
untie()
Undoes the effect of tie(JackLocalPort) . |
Methods inherited from class net.sf.jack4j.JackPort |
---|
ensureMonitor, getLatency, getPortFlags, getPortFlagSet, getPortHandle, getPortName, getPortShortName, getPortType, isInput, isMonitorable, isOutput, isPhysical, isTerminal, monitoringInput, requestMonitor, setLatency |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public JackClient getClient()
public void setPortName(java.lang.String portName) throws JackException
JackException
public void setPortAlias(java.lang.String alias) throws JackException
The port can have at most 2 aliases.
JackException
public void unsetPortAlias(java.lang.String alias) throws JackException
JackException
public java.lang.String[] getPortAliases() throws JackException
JackException
public int connected() throws JackException
JackException
public boolean connectedTo(java.lang.String portName) throws JackException
JackException
public java.lang.String[] getConnections() throws JackException
If the port is not connected, returns null.
JackException
public long getBufferPointer(int bufferSize) throws JackException
The pointer is not very useful in Java, but can be used for some JNI calls.
This method can only be called during JackClient.process(int)
callback, and only by the thread that invoked the callback. The returned
value is valid only during that callback.
bufferSize
- the value passed in bufferSize
parameter to
JackClient.process(int)
JackException
public java.nio.ByteBuffer getByteBuffer(int bufferSize) throws JackException
This method can only be called during JackClient.process(int)
callback, and only by the thread that invoked the callback. The returned
value is valid only during that callback.
The caller is responsible for calling Buffer.clear()
on the
returned value before the buffer is used. Otherwise, the buffer
position, limit, and mark may be set to random value. The buffer
capacity is always set to the buffer size multiplied by
Float.SIZE / 8
.
bufferSize
- the value passed in bufferSize
parameter to
JackClient.process(int)
JackException
public void tie(JackLocalPort sourcePort) throws JackException
The sourcePort must be owned by the same client as this port, and it must be an input port.
This port must be an output port.
JackException
public void untie() throws JackException
tie(JackLocalPort)
.
JackException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |