Examples of enumerateListenEndpoints()


Examples of net.jini.jeri.ServerEndpoint.enumerateListenEndpoints()

   */
  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

Examples of net.jini.jeri.ServerEndpoint.enumerateListenEndpoints()

      throw new IOException();
        }
    }
    LC lc = new LC();
    try {
        serverEndpoint.enumerateListenEndpoints(lc);
    } catch (IOException e) {
    }
    return lc.listenEndpoint;
      }
View Full Code Here

Examples of net.jini.jeri.ServerEndpoint.enumerateListenEndpoints()

  }
    }

    public static void main(String[] args) throws Exception {
  ServerEndpoint sep = TcpServerEndpoint.getInstance(0);
  Endpoint ep = sep.enumerateListenEndpoints(new ListenContext() {
      public ListenCookie addListenEndpoint(ListenEndpoint lep)
    throws IOException
      {
    return lep.listen(new Dispatcher()).getCookie();
      }
View Full Code Here

Examples of net.jini.jeri.ServerEndpoint.enumerateListenEndpoints()

      getServerEndpoint(new PrearrangedServerSocketFactory(socket));
  ServerConnManagerImpl mgr = new ServerConnManagerImpl();
  endpointInternals.setServerConnManager(ep, mgr);

  ListenContextImpl lc = new ListenContextImpl();
  ep.enumerateListenEndpoints(lc);
  ServerConnection conn = mgr.getServerConnection();
  try {
      InputStream in = new BufferedInputStream(conn.getInputStream());
      OutputStream out = new BufferedOutputStream(conn.getOutputStream());
      InboundRequestHandle handle = conn.processRequestData(in, out);
View Full Code Here

Examples of net.jini.jeri.ServerEndpoint.enumerateListenEndpoints()

    return le.listen(new RequestDispatcher() {
        public void dispatch(InboundRequest r) { }
    }).getCookie();
      }
  };
  se.enumerateListenEndpoints(lc);

  synchronized (ssf) {
      long now, deadline = 0;
      while (!ssf.serverSocketClosed) {
    now = System.currentTimeMillis();
View Full Code Here

Examples of net.jini.jeri.ServerEndpoint.enumerateListenEndpoints()

        method);
      }
  }

  Endpoint endpoint =
      serverEndpoint.enumerateListenEndpoints(new ListenContext() {
    public ListenCookie addListenEndpoint(ListenEndpoint le)
        throws IOException
    {
        return le.listen(new RD()).getCookie();
    }
View Full Code Here

Examples of net.jini.jeri.ServerEndpoint.enumerateListenEndpoints()

   * UnknownHostException that does contain the local host name
   * in its detail message.
   */
  System.err.println("Trying with permission:");
  try {
      se.enumerateListenEndpoints(lc);
      throw new RuntimeException("TEST FAILED");
  } catch (UnknownHostException e) {
      e.printStackTrace();
      String message = e.getMessage();
      if (message == null || message.indexOf(localName) == -1) {
View Full Code Here

Examples of net.jini.jeri.ServerEndpoint.enumerateListenEndpoints()

  AccessControlContext acc = new AccessControlContext(
      new ProtectionDomain[] { new ProtectionDomain(null, null) });
  try {
      AccessController.doPrivileged(new PrivilegedExceptionAction() {
    public Object run() throws IOException {
        se.enumerateListenEndpoints(lc);
        throw new RuntimeException("TEST FAILED");
    }
      }, acc);
  } catch (PrivilegedActionException pae) {
      IOException e = (IOException) pae.getCause();
View Full Code Here

Examples of net.jini.jeri.ServerEndpoint.enumerateListenEndpoints()

    public void run() throws Exception {
        //Obtain a serverEndpoint instance
        ServerEndpoint se = getServerEndpoint();
        IllegalArgumentContext context = new IllegalArgumentContext(null);
        //Call enumerateListenEndpoints and extract cookies
        se.enumerateListenEndpoints(context);
        ArrayList cookies = context.getCookies();
        //Obtain a different server endpoint
        se = (ServerEndpoint) getConfigObject(ServerEndpoint.class,
            "diffEndpoint");
        boolean exceptionThrown = false;
View Full Code Here

Examples of net.jini.jeri.ServerEndpoint.enumerateListenEndpoints()

        //Obtain a different server endpoint
        se = (ServerEndpoint) getConfigObject(ServerEndpoint.class,
            "diffEndpoint");
        boolean exceptionThrown = false;
        try {
            se.enumerateListenEndpoints(
                new IllegalArgumentContext(cookies));
        } catch (IllegalArgumentException e) {
            exceptionThrown = true;
        }
        if (!exceptionThrown) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.