electric.net.channel
Interface IChannel

All Known Implementing Classes:
SocketChannel

public interface IChannel

IChannel is an abstraction of a bidirectional communications channel.

Author:
webMethods

Method Summary
 void close()
          Close the channel.
 long getBytesRead()
          Return the number of bytes read by this channel
 long getBytesWritten()
          Return the number of bytes written by this channel
 java.io.InputStream getInputStream()
          Return the input stream.
 XURL getLocalXURL()
          Return the URL of the local endpoint.
 java.io.OutputStream getOutputStream()
          Return the output stream.
 XURL getRemoteXURL()
          Return the URL of the remote endpoint.
 int getState()
          Return state of the channel.
 void setState(int state)
          Change the state of the channel.
 

Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Return the input stream.

Throws:
java.io.IOException - If the input stream cannot be obtained.

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Return the output stream.

Throws:
java.io.IOException - If the output stream cannot be obtained.

close

public void close()
           throws java.io.IOException
Close the channel.

Throws:
java.io.IOException

getLocalXURL

public XURL getLocalXURL()
Return the URL of the local endpoint.


getRemoteXURL

public XURL getRemoteXURL()
Return the URL of the remote endpoint.


getBytesRead

public long getBytesRead()
Return the number of bytes read by this channel


getBytesWritten

public long getBytesWritten()
Return the number of bytes written by this channel


getState

public int getState()
Return state of the channel. The states are defined in IChannelStates


setState

public void setState(int state)
Change the state of the channel. The state passed into the method must be defined in IChannelStates



copyright© 2001-2004 by webMethods All Rights Reserved.