Interface ChannelHostingTransport
-
- All Known Implementing Classes:
BlockingServerTCPTransport,NonBlockingServerTCPTransport
public interface ChannelHostingTransportInterface defining a transport that hosts channels.- Version:
- $Id$
- Author:
- Matej Sekoranja
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddepreallocateChannelSID(int sid)De-preallocate new channel SID.ServerChannelgetChannel(int sid)Get channel by its SID.intgetChannelCount()Get channel count.ServerChannel[]getChannels()Get an array of all hosted channels.intpreallocateChannelSID()Preallocate new channel SID.voidregisterChannel(int sid, ServerChannel channel)Register a new channel.voidunregisterChannel(int sid)Unregister a new channel (and deallocates its handle).
-
-
-
Method Detail
-
preallocateChannelSID
int preallocateChannelSID()
Preallocate new channel SID.- Returns:
- new channel server id (SID).
-
depreallocateChannelSID
void depreallocateChannelSID(int sid)
De-preallocate new channel SID.- Parameters:
sid- preallocated channel SID.
-
registerChannel
void registerChannel(int sid, ServerChannel channel)Register a new channel.- Parameters:
sid- preallocated channel SID.channel- channel to register.
-
unregisterChannel
void unregisterChannel(int sid)
Unregister a new channel (and deallocates its handle).- Parameters:
sid- SID
-
getChannel
ServerChannel getChannel(int sid)
Get channel by its SID.- Parameters:
sid- channel SID- Returns:
- channel with given SID,
nullotherwise
-
getChannelCount
int getChannelCount()
Get channel count.- Returns:
- channel count.
-
getChannels
ServerChannel[] getChannels()
Get an array of all hosted channels.- Returns:
- an array of all hosted channels.
-
-