Package net.jini.jeri

Examples of net.jini.jeri.ServerEndpoint


               = new LookupDiscoveryManager(DiscoveryGroupManagement.NO_GROUPS,
                                            new LookupLocator[0], null,config);
        }

        /* Handle items and duties related to exporting this service. */
        ServerEndpoint endpoint = TcpServerEndpoint.getInstance(0);
        InvocationLayerFactory ilFactory = new BasicILFactory();
        Exporter defaultExporter = new BasicJeriExporter(endpoint,
                                                         ilFactory,
                                                         false,
                                                         true);
View Full Code Here


    }

    private static Ping export(String host, int port, Ping impl)
  throws ExportException, UnsupportedConstraintException
    {
  ServerEndpoint se = getServerEndpoint(host, port, new SF(), null);
  InvocationLayerFactory ilf =
      new BasicILFactory(null, null, PingImpl.class.getClassLoader());
  Exporter exporter = new BasicJeriExporter(se, ilf, false, false);
  return (Ping) exporter.export(impl);
    }
View Full Code Here

 
  ActivationGroupID[] gids = (ActivationGroupID[])
      groupTable.keySet().toArray(
            new ActivationGroupID[groupTable.size()]);
  activator = new ActivatorImpl();
  ServerEndpoint se = TcpServerEndpoint.getInstance(PHOENIX_PORT);
  activatorExporter =
      getExporter(config, "activatorExporter",
      new BasicJeriExporter(se, new BasicILFactory(),
                false, true,
               PhoenixConstants.ACTIVATOR_UUID));
View Full Code Here

   * calls next on the resulting OutboundRequestIterator, returning the
   * result, or any SecurityException or UnsupportedConstraintException
   * it throws.
   */
  public Object run() throws IOException {
      ServerEndpoint serverEndpoint =
    createServerEndpoint(serverSubject, null, "localhost", 0,
             null, getServerSocketFactory());
      endpoint = serverEndpoint.enumerateListenEndpoints(
    new ListenContext() {
        public ListenCookie addListenEndpoint(
      ListenEndpoint listenEndpoint)
      throws IOException
        {
View Full Code Here

    public String name() {
  return "TestTwoEndpoints";
    }

    public Object run() throws Exception {
  ServerEndpoint se1 = SslServerEndpoint.getInstance(PORT);
  ServerEndpoint se2 = SslServerEndpoint.getInstance(HOST, PORT);
  InvocationLayerFactory ilf = new BasicILFactory();
  Exporter e1 = new BasicJeriExporter(se1, ilf);
  Exporter e2 = new BasicJeriExporter(se2, ilf);
  e1.export(new Remote() { });
  e2.export(new Remote() { });
View Full Code Here

  /*
   * Establish two server endpoints and proxies for calling the
   * DGC servers at each of those endpoints.
   */
  ServerEndpoint seA = TcpServerEndpoint.getInstance(PORT_A);
  ServerEndpoint seB = TcpServerEndpoint.getInstance(PORT_B);

  DgcServer dgcA = makeDgcProxy(TcpEndpoint.getInstance("", PORT_A));
  DgcServer dgcB = makeDgcProxy(TcpEndpoint.getInstance("", PORT_B));

  /*
 
View Full Code Here

    this.csf = csf;
    this.ssf = ssf;
      }   

      ListenEndpoint create() {
    ServerEndpoint serverEndpoint;
    try {
        serverEndpoint = KerberosServerEndpoint.getInstance(
      serverSubject, serverPrincipal, serverHost, port,
      csf, ssf);
    } catch (Exception e) {
        throw new RuntimeException(
      "failed to get server endpoint instance", e);
    }
    class LC implements ListenContext {
        ListenEndpoint listenEndpoint;
        public ListenCookie addListenEndpoint(
      ListenEndpoint listenEndpoint)
      throws IOException
        {
      this.listenEndpoint = listenEndpoint;
      throw new IOException();
        }
    }
    LC lc = new LC();
    try {
        serverEndpoint.enumerateListenEndpoints(lc);
    } catch (IOException e) {
    }
    return lc.listenEndpoint;
      }
View Full Code Here

    private static final String loginEntry = "testServer";
    public static void main(String[] args) throws Exception {
  LoginContext loginContext = new LoginContext(loginEntry);
  loginContext.login();
  Subject s = loginContext.getSubject();
  ServerEndpoint se1 = KerberosServerEndpoint.getInstance(s, null, null,
                PORT);
  ServerEndpoint se2 = KerberosServerEndpoint.getInstance(s, null, HOST,
                PORT);
  InvocationLayerFactory ilf = new BasicILFactory();
  Exporter e1 = new BasicJeriExporter(se1, ilf, false, false);
  Exporter e2 = new BasicJeriExporter(se2, ilf, false, false);
  e1.export(new Remote() { });
View Full Code Here

     */
    static ServerEndpoint getEndpoint()
                                  throws UnsupportedConstraintException
    {
        try {
            ServerEndpoint endpoint = null;
            if (doKerberos) {
                endpoint = KerberosServerEndpoint.getInstance(
                    subjectProvider.getServerSubject(),null,null,0,null,null);
            } else if (doHTTPS) {
                endpoint = HttpsServerEndpoint.getInstance(subjectProvider
View Full Code Here

            }//endif

            ldm = new LookupDiscoveryManager(groupsToJoin, locatorsToJoin,
                                             null, config);

            ServerEndpoint endpoint = TcpServerEndpoint.getInstance(0);
            InvocationLayerFactory ilFactory = new BasicILFactory();
            Exporter defaultExporter = new BasicJeriExporter(endpoint,
                                                             ilFactory,
                                                             false,
                                                             true);
View Full Code Here

TOP

Related Classes of net.jini.jeri.ServerEndpoint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.