org.mobicents.media.server.impl.resource.zap
Class Channel

java.lang.Object
  extended by org.mobicents.media.server.impl.resource.zap.Channel
All Implemented Interfaces:
org.mobicents.protocols.ss7.mtp.Mtp1

public class Channel
extends java.lang.Object
implements org.mobicents.protocols.ss7.mtp.Mtp1


Field Summary
protected  int fd
           
 
Constructor Summary
Channel()
           
 
Method Summary
 void close()
           
 void closeChannel(int fd)
          Closes this pipe.
 int getChannelID()
           
 int getCode()
           
 org.mobicents.protocols.ss7.mtp.Mtp2 getLink()
           
 java.lang.String getLinkName()
           
 int getSpan()
           
 void open()
           
 int openChannel(int id)
          Opens this channel and prepares it for reading.
 int read(byte[] buffer)
          Reads data from this pipe.
 int readData(int fd, byte[] buffer)
           
 void setChannelID(int channelID)
           
 void setCode(int code)
           
 void setLink(org.mobicents.protocols.ss7.mtp.Mtp2 link)
           
 void setLinkName(java.lang.String linkName)
           
 void setSpan(int span)
           
 java.lang.String toString()
           
 void write(byte[] buffer, int len)
          Writes specified data to the pipe.
 void writeData(int fd, byte[] buffer, int len)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fd

protected int fd
Constructor Detail

Channel

public Channel()
Method Detail

setLink

public void setLink(org.mobicents.protocols.ss7.mtp.Mtp2 link)
Specified by:
setLink in interface org.mobicents.protocols.ss7.mtp.Mtp1

getLink

public org.mobicents.protocols.ss7.mtp.Mtp2 getLink()
Specified by:
getLink in interface org.mobicents.protocols.ss7.mtp.Mtp1

getSpan

public int getSpan()

setSpan

public void setSpan(int span)

getChannelID

public int getChannelID()

setChannelID

public void setChannelID(int channelID)

setCode

public void setCode(int code)

getCode

public int getCode()
Specified by:
getCode in interface org.mobicents.protocols.ss7.mtp.Mtp1

setLinkName

public void setLinkName(java.lang.String linkName)

getLinkName

public java.lang.String getLinkName()

open

public void open()
Specified by:
open in interface org.mobicents.protocols.ss7.mtp.Mtp1

openChannel

public int openChannel(int id)
Opens this channel and prepares it for reading.

Parameters:
path - the path to the device.

read

public int read(byte[] buffer)
Reads data from this pipe.

Specified by:
read in interface org.mobicents.protocols.ss7.mtp.Mtp1
Parameters:
buffer - the byte buffer to read data.
Returns:
the number of bytes actualy read.

readData

public int readData(int fd,
                    byte[] buffer)

write

public void write(byte[] buffer,
                  int len)
Writes specified data to the pipe.

Specified by:
write in interface org.mobicents.protocols.ss7.mtp.Mtp1
Parameters:
buffer - the buffer with data to write
len - the length of the buffer.

writeData

public void writeData(int fd,
                      byte[] buffer,
                      int len)

close

public void close()
Specified by:
close in interface org.mobicents.protocols.ss7.mtp.Mtp1

closeChannel

public void closeChannel(int fd)
Closes this pipe.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010. All Rights Reserved.