# Class RemotePeerBean

java.lang.Object
org.apache.zookeeper.server.quorum.RemotePeerBean

All Implemented Interfaces:
  `ZKMBeanInfo, RemotePeerMXBean`

public class RemotePeerBean extends Object implements RemotePeerMXBean, ZKMBeanInfo
A remote peer bean only provides limited information about the remote peer, and the peer cannot be managed remotely.

## Constructor Summary

Constructors
Constructor
Description
`RemotePeerBean(QuorumPeer localPeer, QuorumPeer.QuorumServer peer)`

## Method Summary

Modifier and Type
Method
Description
`String`
`getClientAddress()`
`String`
`getElectionAddress()`
`String`
`getLearnerType()`
`String`
`getName()`
`String`
`getQuorumAddress()`
`boolean`
`isHidden()`
If isHidden returns true, the MBean won't be registered with MBean server, and thus won't be available for management tools.
`boolean`
`isLeader()`
`void`
`setQuorumServer(QuorumPeer.QuorumServer peer)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### RemotePeerBean

public RemotePeerBean(QuorumPeer localPeer, QuorumPeer.QuorumServer peer)

## Method Details

### setQuorumServer

public void setQuorumServer(QuorumPeer.QuorumServer peer)

### getName

public String getName()

Specified by:
  `getName` in interface `RemotePeerMXBean`
Specified by:
  `getName` in interface `ZKMBeanInfo`
Returns:
  name of the peer

### isHidden

public boolean isHidden()
Description copied from interface: `ZKMBeanInfo`
If isHidden returns true, the MBean won't be registered with MBean server, and thus won't be available for management tools. Used for grouping MBeans.

Specified by:
  `isHidden` in interface `ZKMBeanInfo`
Returns:
  true if the MBean is hidden.

### getQuorumAddress

public String getQuorumAddress()

Specified by:
  `getQuorumAddress` in interface `RemotePeerMXBean`
Returns:
  IP address of the quorum peer

### getElectionAddress

public String getElectionAddress()

Specified by:
  `getElectionAddress` in interface `RemotePeerMXBean`
Returns:
  the election address

### getClientAddress

public String getClientAddress()

Specified by:
  `getClientAddress` in interface `RemotePeerMXBean`
Returns:
  the client address

### getLearnerType

public String getLearnerType()

Specified by:
  `getLearnerType` in interface `RemotePeerMXBean`
Returns:
  the learner type

### isLeader

public boolean isLeader()

Specified by:
  `isLeader` in interface `RemotePeerMXBean`
Returns:
  true if the peer is the current leader