org.jdiameter.client.impl.controller
Class RealmImpl

java.lang.Object
  extended by org.jdiameter.client.impl.controller.RealmImpl
All Implemented Interfaces:
Realm, IRealm

public class RealmImpl
extends java.lang.Object
implements IRealm

The Realm class implements rows in the Diameter Realm routing table.

Author:
Alexandre Mendonca , Bartosz Baranowski

Field Summary
protected  LocalAction action
           
protected  IAgent agent
           
protected  IAgentConfiguration agentConfiguration
           
protected  ApplicationId appId
           
protected  boolean dynamic
           
protected  long expirationTime
           
protected  java.util.Collection<java.lang.String> hosts
           
protected  java.lang.String name
           
 
Constructor Summary
RealmImpl(java.lang.String name, ApplicationId applicationId, LocalAction localAction, IAgent agent, IAgentConfiguration agentConfiguration, boolean dynamic, long expirationTime, java.lang.String... hosts)
           
 
Method Summary
 void addPeerName(java.lang.String name)
          Append new host (peer) to this realm
 IAgent getAgent()
          Get the processing agent for this realm
 IAgentConfiguration getAgentConfiguration()
          Get agent configuration values for this realm.
 ApplicationId getApplicationId()
          Return applicationId associated with this realm
 long getExpirationTime()
          Return expiration time for this realm in milisec
 LocalAction getLocalAction()
          Return realm local action for this realm
 java.lang.String getName()
          Return name of this realm
 java.lang.String[] getPeerNames()
          Return list of real peers
 boolean hasPeerName(java.lang.String name)
          Checks if a peer name belongs to this realm
 boolean isDynamic()
          Return true if this realm is dynamic updated
 boolean isLocal()
           
 void removePeerName(java.lang.String s)
          Remove peer from this realm
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name

appId

protected ApplicationId appId

action

protected LocalAction action

dynamic

protected boolean dynamic

expirationTime

protected long expirationTime

hosts

protected java.util.Collection<java.lang.String> hosts

agent

protected IAgent agent

agentConfiguration

protected IAgentConfiguration agentConfiguration
Constructor Detail

RealmImpl

public RealmImpl(java.lang.String name,
                 ApplicationId applicationId,
                 LocalAction localAction,
                 IAgent agent,
                 IAgentConfiguration agentConfiguration,
                 boolean dynamic,
                 long expirationTime,
                 java.lang.String... hosts)
Method Detail

getName

public java.lang.String getName()
Return name of this realm

Specified by:
getName in interface Realm
Returns:
name

getApplicationId

public ApplicationId getApplicationId()
Return applicationId associated with this realm

Specified by:
getApplicationId in interface Realm
Returns:
applicationId

getLocalAction

public LocalAction getLocalAction()
Return realm local action for this realm

Specified by:
getLocalAction in interface Realm
Returns:
realm local action

getPeerNames

public java.lang.String[] getPeerNames()
Return list of real peers

Specified by:
getPeerNames in interface IRealm
Returns:
array of realm peers

addPeerName

public void addPeerName(java.lang.String name)
Append new host (peer) to this realm

Specified by:
addPeerName in interface IRealm
Parameters:
host - name of peer host

removePeerName

public void removePeerName(java.lang.String s)
Remove peer from this realm

Specified by:
removePeerName in interface IRealm
Parameters:
host - name of peer host

isDynamic

public boolean isDynamic()
Return true if this realm is dynamic updated

Specified by:
isDynamic in interface Realm
Returns:
true if this realm is dynamic updated

getExpirationTime

public long getExpirationTime()
Return expiration time for this realm in milisec

Specified by:
getExpirationTime in interface Realm
Returns:
expiration time

hasPeerName

public boolean hasPeerName(java.lang.String name)
Description copied from interface: IRealm
Checks if a peer name belongs to this realm

Specified by:
hasPeerName in interface IRealm
Parameters:
name - name of peer host
Returns:
true if the the peer belongs to this realm, false otherwise

getAgent

public IAgent getAgent()
Description copied from interface: IRealm
Get the processing agent for this realm

Specified by:
getAgent in interface IRealm
Returns:
the agent for this realm, if any

getAgentConfiguration

public IAgentConfiguration getAgentConfiguration()
Description copied from interface: IRealm
Get agent configuration values for this realm.

Specified by:
getAgentConfiguration in interface IRealm
Returns:

isLocal

public boolean isLocal()
Specified by:
isLocal in interface Realm

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2014. All Rights Reserved.