FileDocCategorySizeDatePackage
WSTCPProtocolHandler.javaAPI DocExample3875Tue May 29 16:57:08 BST 2007com.sun.xml.ws.transport.tcp.grizzly

WSTCPProtocolHandler

public final class WSTCPProtocolHandler extends Object implements com.sun.enterprise.web.portunif.ProtocolHandler
author
Alexey Stashok

Fields Summary
private static final Logger
logger
private static com.sun.xml.ws.transport.tcp.server.IncomeMessageProcessor
processor
Constructors Summary
Methods Summary
public booleanexpireKey(java.nio.channels.SelectionKey key)
Invoked when the SelectorThread is about to expire a SelectionKey.

return
true if the SelectorThread should expire the SelectionKey, false if not.

        if (processor != null) {
            processor.notifyClosed((SocketChannel) key.channel());
        }
        
        return true;
    
public java.lang.String[]getProtocols()

        return new String[] {TCPConstants.PROTOCOL_SCHEMA};
    
public voidhandle(com.sun.enterprise.web.portunif.util.ProtocolInfo tupple)

        if (processor != null) {
            tupple.byteBuffer.flip();
            processor.process(tupple.byteBuffer, (SocketChannel) tupple.key.channel());
        } else {
            logger.log(Level.WARNING, MessagesMessages.WSTCP_0013_TCP_PROCESSOR_NOT_REGISTERED());
        }
    
public static voidsetIncomingMessageProcessor(com.sun.xml.ws.transport.tcp.server.IncomeMessageProcessor processor)

    
          
        WSTCPProtocolHandler.processor = processor;