com.sun.sgs.protocol
Interface ProtocolAcceptor

All Known Implementing Classes:
SimpleSgsProtocolAcceptor

public interface ProtocolAcceptor

A service for accepting incoming connections for a given protocol. A ProtocolAcceptor must have a constructor that takes the following arguments:


Method Summary
 void accept(ProtocolListener listener)
          Starts accepting connections, and notifies the specified listener of new connections.
 void close()
          Shuts down any pending accept operation as well as the acceptor itself.
 ProtocolDescriptor getDescriptor()
          Returns the descriptor for this protocol.
 

Method Detail

getDescriptor

ProtocolDescriptor getDescriptor()
Returns the descriptor for this protocol. Multiple calls to this method may return the same object.

Returns:
the descriptor for this protocol

accept

void accept(ProtocolListener listener)
            throws IOException
Starts accepting connections, and notifies the specified listener of new connections.

When an incoming connection with a given identity is established with this protocol acceptor, the protocol acceptor should invoke the provided listener's newLogin method with the identity and the protocol connection.

Parameters:
listener - a protocol listener
Throws:
IOException - if an IO problem occurs

close

void close()
           throws IOException
Shuts down any pending accept operation as well as the acceptor itself.

Throws:
IOException - if an IO problem occurs

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved