summaryrefslogtreecommitdiff
path: root/java/src/Glacier2/SessionFactoryHelper.java
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2010-05-18 20:06:03 -0700
committerMark Spruiell <mes@zeroc.com>2010-05-18 20:06:03 -0700
commitb7300a6afcbb409cf959d88cd0914eb95f334bd0 (patch)
tree80c332b102dd02b61ecf4639b1cf1183b9186bc8 /java/src/Glacier2/SessionFactoryHelper.java
parentAnother fix for IceSSL to work with VC6 as well as VC10 (diff)
downloadice-b7300a6afcbb409cf959d88cd0914eb95f334bd0.tar.bz2
ice-b7300a6afcbb409cf959d88cd0914eb95f334bd0.tar.xz
ice-b7300a6afcbb409cf959d88cd0914eb95f334bd0.zip
adding setConnectContext to Glacier2.SessionFactoryHelper
Diffstat (limited to 'java/src/Glacier2/SessionFactoryHelper.java')
-rw-r--r--java/src/Glacier2/SessionFactoryHelper.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/java/src/Glacier2/SessionFactoryHelper.java b/java/src/Glacier2/SessionFactoryHelper.java
index 046f2c5780e..59c424ab7f7 100644
--- a/java/src/Glacier2/SessionFactoryHelper.java
+++ b/java/src/Glacier2/SessionFactoryHelper.java
@@ -217,6 +217,17 @@ public class SessionFactoryHelper
}
/**
+ * Sets the request context to use while establishing a connection to the Glacier2 router.
+ *
+ * @param context The request context.
+ */
+ synchronized public void
+ setConnectContext(final java.util.Map<String, String> context)
+ {
+ _context = context;
+ }
+
+ /**
* Connects to the Glacier2 router using the associated SSL credentials.
*
* Once the connection is established, {@link SessionCallback#connected} is called on the callback object;
@@ -228,7 +239,7 @@ public class SessionFactoryHelper
connect()
{
SessionHelper session = new SessionHelper(_callback, createInitData());
- session.connect();
+ session.connect(_context);
return session;
}
@@ -246,7 +257,7 @@ public class SessionFactoryHelper
connect(final String username, final String password)
{
SessionHelper session = new SessionHelper(_callback, createInitData());
- session.connect(username, password);
+ session.connect(username, password, _context);
return session;
}
@@ -312,6 +323,7 @@ public class SessionFactoryHelper
private boolean _secure = true;
private int _port = 0;
private int _timeout = 10000;
+ private java.util.Map<String, String> _context;
private static final int GLACIER2_SSL_PORT = 4064;
private static final int GLACIER2_TCP_PORT = 4063;
}