use of org.jdiameter.api.Peer in project jain-slee.diameter by RestComm.
the class DiameterShServerResourceAdaptor method getConnectedPeers.
public DiameterIdentity[] getConnectedPeers() {
if (stack != null) {
try {
// Get the list of peers from the stack
List<Peer> peers = stack.unwrap(PeerTable.class).getPeerTable();
DiameterIdentity[] result = new DiameterIdentity[peers.size()];
int i = 0;
// Get each peer from the list and make a DiameterIdentity
for (Peer peer : peers) {
DiameterIdentity identity = new DiameterIdentity(peer.getUri().toString());
result[i++] = identity;
}
return result;
} catch (Exception e) {
tracer.severe("Failure getting peer list.", e);
}
}
return null;
}
use of org.jdiameter.api.Peer in project jain-slee.diameter by RestComm.
the class DiameterCxDxResourceAdaptor method getConnectedPeers.
public DiameterIdentity[] getConnectedPeers() {
if (this.stack != null) {
try {
// Get the list of peers from the stack
List<Peer> peers = stack.unwrap(PeerTable.class).getPeerTable();
DiameterIdentity[] result = new DiameterIdentity[peers.size()];
int i = 0;
// Get each peer from the list and make a DiameterIdentity
for (Peer peer : peers) {
DiameterIdentity identity = new DiameterIdentity(peer.getUri().toString());
result[i++] = identity;
}
return result;
} catch (Exception e) {
tracer.severe("Failure getting peer list.", e);
}
}
return new DiameterIdentity[0];
}
use of org.jdiameter.api.Peer in project jain-slee.diameter by RestComm.
the class DiameterRfResourceAdaptor method getConnectedPeers.
/**
* @return
*/
public DiameterIdentity[] getConnectedPeers() {
if (this.stack != null) {
try {
// Get the list of peers from the stack
List<Peer> peers = stack.unwrap(PeerTable.class).getPeerTable();
DiameterIdentity[] result = new DiameterIdentity[peers.size()];
int i = 0;
// Get each peer from the list and make a DiameterIdentity
for (Peer peer : peers) {
DiameterIdentity identity = new DiameterIdentity(peer.getUri().toString());
result[i++] = identity;
}
return result;
} catch (Exception e) {
tracer.severe("Failure getting peer list.", e);
}
}
return new DiameterIdentity[0];
}
use of org.jdiameter.api.Peer in project jain-slee.diameter by RestComm.
the class DiameterGqResourceAdaptor method getConnectedPeers.
public DiameterIdentity[] getConnectedPeers() {
if (this.stack != null) {
try {
// Get the list of peers from the stack
List<Peer> peers = stack.unwrap(PeerTable.class).getPeerTable();
DiameterIdentity[] result = new DiameterIdentity[peers.size()];
int i = 0;
// Get each peer from the list and make a DiameterIdentity
for (Peer peer : peers) {
DiameterIdentity identity = new DiameterIdentity(peer.getUri().toString());
result[i++] = identity;
}
return result;
} catch (Exception e) {
tracer.severe("Failure getting peer list.", e);
}
}
return new DiameterIdentity[0];
}
use of org.jdiameter.api.Peer in project jain-slee.diameter by RestComm.
the class DiameterS6aResourceAdaptor method getConnectedPeers.
public DiameterIdentity[] getConnectedPeers() {
if (this.stack != null) {
try {
// Get the list of peers from the stack
List<Peer> peers = stack.unwrap(PeerTable.class).getPeerTable();
DiameterIdentity[] result = new DiameterIdentity[peers.size()];
int i = 0;
// Get each peer from the list and make a DiameterIdentity
for (Peer peer : peers) {
DiameterIdentity identity = new DiameterIdentity(peer.getUri().toString());
result[i++] = identity;
}
return result;
} catch (Exception e) {
tracer.severe("Failure getting peer list.", e);
}
}
return new DiameterIdentity[0];
}
Aggregations