javax.management.remote.generic
Interface MessageConnectionServer


public interface MessageConnectionServer

Interface specifying how a connector server creates new connections to clients.

An instance of this interface can be communicated to the Generic Conenctor Server using the attribute GenericConnectorServer.MESSAGE_CONNECTION_SERVER in the Map passed to its constructor.


Method Summary
 MessageConnection accept()
          Listens for a connection to be made to this server and accepts it.
 JMXServiceURL getAddress()
          The address of this connection server.
 void start(Map env)
          Activates this server for new client connections.
 void stop()
          Terminates this server.
 

Method Detail

start

void start(Map env)
           throws IOException

Activates this server for new client connections. Before this call is made, new client connections are not accepted. The behavior is unspecified if this method is called more than once.

Parameters:
env - the properties of the connector server.
Throws:
IOException - if the server cannot be activated.

accept

MessageConnection accept()
                         throws IOException

Listens for a connection to be made to this server and accepts it. The method blocks until a connection is made.

Returns:
a new MessageConnection object.
Throws:
IOException - if an I/O error occurs when waiting for a connection.

stop

void stop()
          throws IOException

Terminates this server. On return from this method, new connection attempts are refused. Existing connections are unaffected by this call. The behavior is unspecified if this method is called before the start(java.util.Map) method.

Throws:
IOException - if an I/O error occurs when stopping the server. A best effort will have been made to clean up the server's resources. The caller will not call accept() after stop(), whether or not it gets IOException.

getAddress

JMXServiceURL getAddress()

The address of this connection server.

Returns:
the address of this connection server, or null if it does not have one.

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.