|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdiameter.client.impl.router.RouterImpl
public class RouterImpl
| Nested Class Summary | |
|---|---|
protected class |
RouterImpl.AnswerEntry
|
protected class |
RouterImpl.RedirectEntry
|
| Field Summary | |
|---|---|
static int |
ALL_APPLICATION
|
static int |
ALL_HOST
|
static int |
ALL_REALM
|
static int |
ALL_SESSION
|
static int |
ALL_USER
|
static int |
DONT_CACHE
|
protected java.util.logging.Logger |
logger
|
protected org.jdiameter.api.MetaData |
metaData
|
static int |
REALM_AND_APPLICATION
|
int |
REDIRECT_TABLE_SIZE
|
protected java.util.concurrent.ScheduledFuture |
redirectEntryHandler
|
protected java.util.concurrent.ScheduledExecutorService |
redirectScheduler
|
protected java.util.concurrent.ConcurrentHashMap<RouterImpl.RedirectEntry,RouterImpl.RedirectEntry> |
redirectTable
|
protected java.lang.Runnable |
redirectTask
|
static int |
REQUEST_TABLE_CLEAR_SIZE
|
static int |
REQUEST_TABLE_SIZE
|
protected java.util.HashMap<java.lang.Long,RouterImpl.AnswerEntry> |
requestEntryTable
|
protected java.util.concurrent.locks.ReadWriteLock |
requestLock
|
protected java.util.SortedMap<java.lang.Long,java.lang.Long> |
requestSortedEntryTable
|
| Constructor Summary | |
|---|---|
RouterImpl(org.jdiameter.api.Configuration config,
org.jdiameter.api.MetaData aMetaData)
|
|
| Method Summary | |
|---|---|
protected boolean |
checkRealm(java.lang.String name)
|
void |
destroy()
Release all resources |
IPeer |
getPeer(IMessage message,
IPeerTable manager)
Return peer from inner peer table by predefined pameters |
protected IPeer |
getPeerPredProcessing(IMessage message,
java.lang.String destRealm,
java.lang.String destHost)
|
java.lang.String |
getRealmForPeer(java.lang.String destHost)
Return realm of peer by fqdn |
protected java.lang.String[] |
getRealmPeers(java.lang.String key)
|
protected java.util.Set<java.lang.String> |
getRealmsName()
|
java.lang.String[] |
getRequestRouteInfo(long hopByHopIdentifier)
Return Request route info |
protected void |
init()
|
protected void |
loadConfiguration(org.jdiameter.api.Configuration config)
|
protected void |
redirectProcessing(IMessage message,
java.lang.String destRealm,
java.lang.String destHost)
|
void |
registerRequestRouteInfo(IMessage request)
Register route information by received request. |
protected IPeer |
selectPeer(java.util.List<IPeer> avaliblePeers)
|
void |
start()
Start inner time facilities |
void |
stop()
Stop inner time facilities |
void |
updateRedirectInformation(IMessage answer)
Update redirect information |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DONT_CACHE
public static final int ALL_SESSION
public static final int ALL_REALM
public static final int REALM_AND_APPLICATION
public static final int ALL_APPLICATION
public static final int ALL_HOST
public static final int ALL_USER
protected java.util.logging.Logger logger
protected org.jdiameter.api.MetaData metaData
public final int REDIRECT_TABLE_SIZE
protected java.util.concurrent.ConcurrentHashMap<RouterImpl.RedirectEntry,RouterImpl.RedirectEntry> redirectTable
protected java.util.concurrent.ScheduledExecutorService redirectScheduler
protected java.lang.Runnable redirectTask
protected java.util.concurrent.ScheduledFuture redirectEntryHandler
public static final int REQUEST_TABLE_SIZE
public static final int REQUEST_TABLE_CLEAR_SIZE
protected java.util.concurrent.locks.ReadWriteLock requestLock
protected java.util.HashMap<java.lang.Long,RouterImpl.AnswerEntry> requestEntryTable
protected java.util.SortedMap<java.lang.Long,java.lang.Long> requestSortedEntryTable
| Constructor Detail |
|---|
public RouterImpl(org.jdiameter.api.Configuration config,
org.jdiameter.api.MetaData aMetaData)
| Method Detail |
|---|
protected void init()
protected void loadConfiguration(org.jdiameter.api.Configuration config)
public void registerRequestRouteInfo(IMessage request)
IRouter
registerRequestRouteInfo in interface IRouterrequest - requestpublic java.lang.String[] getRequestRouteInfo(long hopByHopIdentifier)
IRouter
getRequestRouteInfo in interface IRouterhopByHopIdentifier - hop By Hop Indentifier
public void updateRedirectInformation(IMessage answer)
throws org.jdiameter.api.InternalException,
org.jdiameter.api.RouteException
IRouter
updateRedirectInformation in interface IRouteranswer - redirect answer message
org.jdiameter.api.InternalException
org.jdiameter.api.RouteException
public IPeer getPeer(IMessage message,
IPeerTable manager)
throws org.jdiameter.api.RouteException,
org.jdiameter.api.AvpDataException
IRouter
getPeer in interface IRoutermessage - message with routed avpsmanager - instance of peer manager
org.jdiameter.api.RouteException
org.jdiameter.api.AvpDataException
protected IPeer getPeerPredProcessing(IMessage message,
java.lang.String destRealm,
java.lang.String destHost)
public void start()
IRouter
start in interface IRouterpublic void stop()
IRouter
stop in interface IRouterpublic void destroy()
IRouter
destroy in interface IRouterprotected IPeer selectPeer(java.util.List<IPeer> avaliblePeers)
protected void redirectProcessing(IMessage message,
java.lang.String destRealm,
java.lang.String destHost)
throws org.jdiameter.api.AvpDataException
org.jdiameter.api.AvpDataExceptionpublic java.lang.String getRealmForPeer(java.lang.String destHost)
IRouter
getRealmForPeer in interface IRouterdestHost - host name
protected boolean checkRealm(java.lang.String name)
protected java.util.Set<java.lang.String> getRealmsName()
protected java.lang.String[] getRealmPeers(java.lang.String key)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||