Interface ChannelHostingTransport
-
- All Known Implementing Classes:
BlockingServerTCPTransport
,NonBlockingServerTCPTransport
public interface ChannelHostingTransport
Interface defining a transport that hosts channels.- Version:
- $Id$
- Author:
- Matej Sekoranja
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
depreallocateChannelSID(int sid)
De-preallocate new channel SID.ServerChannel
getChannel(int sid)
Get channel by its SID.int
getChannelCount()
Get channel count.ServerChannel[]
getChannels()
Get an array of all hosted channels.int
preallocateChannelSID()
Preallocate new channel SID.void
registerChannel(int sid, ServerChannel channel)
Register a new channel.void
unregisterChannel(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,
null
otherwise
-
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.
-
-