org.jacorb.imr

Class ImRPOAInfo

public class ImRPOAInfo extends Object implements Serializable

This class stores information about a POA. It also provides methods for reactivation, conversion, and for waiting for reactivation.

Version: $Id: ImRPOAInfo.java,v 1.11 2006/06/27 12:54:33 alphonse.bendt Exp $

Author: Nicolas Noffke

Field Summary
protected booleanactive
protected Stringhost
protected Stringname
protected intport
static longserialVersionUID
protected ImRServerInfoserver
protected longtimeout
Constructor Summary
ImRPOAInfo(String name, String host, int port, ImRServerInfo server, long timeout)
The constructor of this class.
Method Summary
booleanawaitActivation()
This method blocks until the POA is reactivated, or the timeout is exceeded.
voidreactivate(String host, int port)
Reactivates this POA, i.e. sets it to active and unblocks any waiting threads.
POAInfotoPOAInfo()
"Converts" this Object to an instance of the POAInfo class.

Field Detail

active

protected boolean active

host

protected String host

name

protected String name

port

protected int port

serialVersionUID

public static final long serialVersionUID

server

protected ImRServerInfo server

timeout

protected long timeout

Constructor Detail

ImRPOAInfo

public ImRPOAInfo(String name, String host, int port, ImRServerInfo server, long timeout)
The constructor of this class.

Parameters: name the POAs name. host the POAs host. port the port the POA listens on. server the server the POA is associated with.

Throws: IllegalPOAName thrown when name is null or of length zero.

Method Detail

awaitActivation

public boolean awaitActivation()
This method blocks until the POA is reactivated, or the timeout is exceeded.

Returns: false, if the timeout has been exceeded, true otherwise.

reactivate

public void reactivate(String host, int port)
Reactivates this POA, i.e. sets it to active and unblocks any waiting threads.

Parameters: host the POAs new host. port the POAs new port.

toPOAInfo

public POAInfo toPOAInfo()
"Converts" this Object to an instance of the POAInfo class.

Returns: a POAInfo object.