FileDocCategorySizeDatePackage
ServerConnectionSession.javaAPI DocExample3754Tue May 29 16:57:10 BST 2007com.sun.xml.ws.transport.tcp.server

ServerConnectionSession

public final class ServerConnectionSession extends com.sun.xml.ws.transport.tcp.util.ConnectionSession
author
Alexey Stashok

Fields Summary
private Map
channelId2context
private int
channelCounter
Constructors Summary
public ServerConnectionSession(com.sun.xml.ws.transport.tcp.io.Connection connection, com.sun.xml.ws.transport.tcp.util.SessionCloseListener sessionCloseListener)

    
           
        super(connection, sessionCloseListener);
        channelCounter = 1;
        init();
    
Methods Summary
public voidclose()

        super.close();

        channelId2context = null;
    
public voidderegisterChannel(int channelId)

        channelId2context.remove(channelId);
    
public voidderegisterChannel(com.sun.xml.ws.transport.tcp.util.ChannelContext context)

        deregisterChannel(context.getChannelId());
    
public com.sun.xml.ws.transport.tcp.util.ChannelContextfindWSServiceContextByChannelId(int channelId)

        return channelId2context.get(channelId);
    
public intgetChannelsAmount()

        return channelId2context.size();
    
public synchronized intgetNextAvailChannelId()

        return channelCounter++;
    
public voidregisterChannel(com.sun.xml.ws.transport.tcp.util.ChannelContext context)

        channelId2context.put(context.getChannelId(), context);