diff options
Diffstat (limited to 'src/org/noreply/fancydress/type3/routing')
3 files changed, 45 insertions, 0 deletions
diff --git a/src/org/noreply/fancydress/type3/routing/RoutingForward.java b/src/org/noreply/fancydress/type3/routing/RoutingForward.java index 183696a..7c05eed 100644 --- a/src/org/noreply/fancydress/type3/routing/RoutingForward.java +++ b/src/org/noreply/fancydress/type3/routing/RoutingForward.java @@ -38,5 +38,18 @@ public abstract class RoutingForward extends Routing { public byte[] getKeyID() { return keyid; } + + /** + * Get the hostname needed for connectig to the node. + * + * @return hostname. + */ + public abstract String getHostname(); + /** + * Get the port needed for connectig to the node. + * + * @return port + */ + public abstract int getPort(); } diff --git a/src/org/noreply/fancydress/type3/routing/RoutingHOST.java b/src/org/noreply/fancydress/type3/routing/RoutingHOST.java index 6138c2e..be568b4 100644 --- a/src/org/noreply/fancydress/type3/routing/RoutingHOST.java +++ b/src/org/noreply/fancydress/type3/routing/RoutingHOST.java @@ -94,5 +94,21 @@ public class RoutingHOST extends RoutingForward { return result; } + /** + * Get the hostname needed for connectig to the node. + * + * @return hostname. + */ + public String getHostname() { + return hostname; + } + /** + * Get the port needed for connectig to the node. + * + * @return port + */ + public int getPort() { + return port; + } } diff --git a/src/org/noreply/fancydress/type3/routing/RoutingIP4.java b/src/org/noreply/fancydress/type3/routing/RoutingIP4.java index e0527a0..9db61dd 100644 --- a/src/org/noreply/fancydress/type3/routing/RoutingIP4.java +++ b/src/org/noreply/fancydress/type3/routing/RoutingIP4.java @@ -102,5 +102,21 @@ public class RoutingIP4 extends RoutingForward { return result; } + /** + * Get the hostname needed for connectig to the node. + * + * @return hostname. + */ + public String getHostname() { + return ip.getHostAddress(); + } + /** + * Get the port needed for connectig to the node. + * + * @return port + */ + public int getPort() { + return port; + } } |