com.sun.corba.se.pept.transport.Acceptor Java Examples

The following examples show how to use com.sun.corba.se.pept.transport.Acceptor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: CorbaTransportManagerImpl.java    License: Apache License 2.0 6 votes vote down vote up
public Collection getAcceptors(String objectAdapterManagerId,
                               ObjectAdapterId objectAdapterId)
{
    // REVISIT - need to filter based on arguments.

    // REVISIT - initialization will be moved to OA.
    // Lazy initialization of acceptors.
    Iterator iterator = acceptors.iterator();
    while (iterator.hasNext()) {
        Acceptor acceptor = (Acceptor) iterator.next();
        if (acceptor.initialize()) {
            if (acceptor.shouldRegisterAcceptEvent()) {
                orb.getTransportManager().getSelector(0)
                    .registerForEvent(acceptor.getEventHandler());
            }
        }
    }
    return acceptors;
}
 
Example #2
Source Project: openjdk-8   Author: bpupadhyaya   File: CorbaTransportManagerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public Collection getAcceptors(String objectAdapterManagerId,
                               ObjectAdapterId objectAdapterId)
{
    // REVISIT - need to filter based on arguments.

    // REVISIT - initialization will be moved to OA.
    // Lazy initialization of acceptors.
    Iterator iterator = acceptors.iterator();
    while (iterator.hasNext()) {
        Acceptor acceptor = (Acceptor) iterator.next();
        if (acceptor.initialize()) {
            if (acceptor.shouldRegisterAcceptEvent()) {
                orb.getTransportManager().getSelector(0)
                    .registerForEvent(acceptor.getEventHandler());
            }
        }
    }
    return acceptors;
}
 
Example #3
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: CorbaTransportManagerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public Collection getAcceptors(String objectAdapterManagerId,
                               ObjectAdapterId objectAdapterId)
{
    // REVISIT - need to filter based on arguments.

    // REVISIT - initialization will be moved to OA.
    // Lazy initialization of acceptors.
    Iterator iterator = acceptors.iterator();
    while (iterator.hasNext()) {
        Acceptor acceptor = (Acceptor) iterator.next();
        if (acceptor.initialize()) {
            if (acceptor.shouldRegisterAcceptEvent()) {
                orb.getTransportManager().getSelector(0)
                    .registerForEvent(acceptor.getEventHandler());
            }
        }
    }
    return acceptors;
}
 
Example #4
Source Project: jdk8u60   Author: chenghanpeng   File: CorbaTransportManagerImpl.java    License: GNU General Public License v2.0 6 votes vote down vote up
public Collection getAcceptors(String objectAdapterManagerId,
                               ObjectAdapterId objectAdapterId)
{
    // REVISIT - need to filter based on arguments.

    // REVISIT - initialization will be moved to OA.
    // Lazy initialization of acceptors.
    Iterator iterator = acceptors.iterator();
    while (iterator.hasNext()) {
        Acceptor acceptor = (Acceptor) iterator.next();
        if (acceptor.initialize()) {
            if (acceptor.shouldRegisterAcceptEvent()) {
                orb.getTransportManager().getSelector(0)
                    .registerForEvent(acceptor.getEventHandler());
            }
        }
    }
    return acceptors;
}
 
Example #5
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: SocketOrChannelConnectionImpl.java    License: Apache License 2.0 5 votes vote down vote up
public SocketOrChannelConnectionImpl(ORB orb,
                                     Acceptor acceptor,
                                     Socket socket)
{
    this(orb, acceptor, socket,
         (socket.getChannel() == null
          ? false
          : orb.getORBData().connectionSocketUseSelectThreadToWait()),
         (socket.getChannel() == null
          ? false
          : orb.getORBData().connectionSocketUseWorkerThreadForEvent()));
}
 
Example #6
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: DefaultSocketFactoryImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void setAcceptedSocketOptions(Acceptor acceptor,
                                     ServerSocket serverSocket,
                                     Socket socket)
    throws SocketException
{
    // Disable Nagle's algorithm (i.e., always send immediately).
    socket.setTcpNoDelay(true);
    if (keepAlive)
        socket.setKeepAlive(true);
}
 
Example #7
Source Project: openjdk-8-source   Author: keerath   File: DefaultSocketFactoryImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void setAcceptedSocketOptions(Acceptor acceptor,
                                     ServerSocket serverSocket,
                                     Socket socket)
    throws SocketException
{
    // Disable Nagle's algorithm (i.e., always send immediately).
    socket.setTcpNoDelay(true);
    if (keepAlive)
        socket.setKeepAlive(true);
}
 
Example #8
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: CorbaInboundConnectionCacheImpl.java    License: Apache License 2.0 5 votes vote down vote up
public void put(Acceptor acceptor, Connection connection)
{
    if (orb.transportDebugFlag) {
        dprint(".put: " + acceptor + " " + connection);
    }
    synchronized (backingStore()) {
        connectionCache.add(connection);
        connection.setConnectionCache(this);
        dprintStatistics();
    }
}
 
Example #9
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: SocketOrChannelConnectionImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public SocketOrChannelConnectionImpl(ORB orb,
                                     Acceptor acceptor,
                                     Socket socket,
                                     boolean useSelectThreadToWait,
                                     boolean useWorkerThread)
{
    this(orb, useSelectThreadToWait, useWorkerThread);

    this.socket = socket;
    socketChannel = socket.getChannel();
    if (socketChannel != null) {
        // REVISIT
        try {
            boolean isBlocking = !useSelectThreadToWait;
            socketChannel.configureBlocking(isBlocking);
        } catch (IOException e) {
            RuntimeException rte = new RuntimeException();
            rte.initCause(e);
            throw rte;
        }
    }
    this.acceptor = acceptor;

    serverRequestMap = Collections.synchronizedMap(new HashMap());
    isServer = true;

    state = ESTABLISHED;
}
 
Example #10
Source Project: hottub   Author: dsrg-uoft   File: CorbaInboundConnectionCacheImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public CorbaInboundConnectionCacheImpl(ORB orb, Acceptor acceptor)
{
    super(orb, acceptor.getConnectionCacheType(),
          ((CorbaAcceptor)acceptor).getMonitoringName());
    this.connectionCache = new ArrayList();
    this.acceptor = acceptor;
    if (orb.transportDebugFlag) {
        dprint(": " + acceptor );
    }
}
 
Example #11
Source Project: TencentKona-8   Author: Tencent   File: CorbaTransportManagerImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public synchronized void registerAcceptor(Acceptor acceptor)
{
    if (orb.transportDebugFlag) {
        dprint(".registerAcceptor->: " + acceptor);
    }
    acceptors.add(acceptor);
    if (orb.transportDebugFlag) {
        dprint(".registerAcceptor<-: " + acceptor);
    }
}
 
Example #12
Source Project: TencentKona-8   Author: Tencent   File: DefaultSocketFactoryImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void setAcceptedSocketOptions(Acceptor acceptor,
                                     ServerSocket serverSocket,
                                     Socket socket)
    throws SocketException
{
    // Disable Nagle's algorithm (i.e., always send immediately).
    socket.setTcpNoDelay(true);
    if (keepAlive)
        socket.setKeepAlive(true);
}
 
Example #13
Source Project: TencentKona-8   Author: Tencent   File: SocketOrChannelConnectionImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public SocketOrChannelConnectionImpl(ORB orb,
                                     Acceptor acceptor,
                                     Socket socket,
                                     boolean useSelectThreadToWait,
                                     boolean useWorkerThread)
{
    this(orb, useSelectThreadToWait, useWorkerThread);

    this.socket = socket;
    socketChannel = socket.getChannel();
    if (socketChannel != null) {
        // REVISIT
        try {
            boolean isBlocking = !useSelectThreadToWait;
            socketChannel.configureBlocking(isBlocking);
        } catch (IOException e) {
            RuntimeException rte = new RuntimeException();
            rte.initCause(e);
            throw rte;
        }
    }
    this.acceptor = acceptor;

    serverRequestMap = Collections.synchronizedMap(new HashMap());
    isServer = true;

    state = ESTABLISHED;
}
 
Example #14
Source Project: TencentKona-8   Author: Tencent   File: SocketOrChannelConnectionImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public SocketOrChannelConnectionImpl(ORB orb,
                                     Acceptor acceptor,
                                     Socket socket)
{
    this(orb, acceptor, socket,
         (socket.getChannel() == null
          ? false
          : orb.getORBData().connectionSocketUseSelectThreadToWait()),
         (socket.getChannel() == null
          ? false
          : orb.getORBData().connectionSocketUseWorkerThreadForEvent()));
}
 
Example #15
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: SocketOrChannelConnectionImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public SocketOrChannelConnectionImpl(ORB orb,
                                     Acceptor acceptor,
                                     Socket socket)
{
    this(orb, acceptor, socket,
         (socket.getChannel() == null
          ? false
          : orb.getORBData().connectionSocketUseSelectThreadToWait()),
         (socket.getChannel() == null
          ? false
          : orb.getORBData().connectionSocketUseWorkerThreadForEvent()));
}
 
Example #16
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: ListenerThreadImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public ListenerThreadImpl(ORB orb, Acceptor acceptor, Selector selector)
{
    this.orb = orb;
    this.acceptor = acceptor;
    this.selector = selector;
    keepRunning = true;
}
 
Example #17
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: DefaultSocketFactoryImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void setAcceptedSocketOptions(Acceptor acceptor,
                                     ServerSocket serverSocket,
                                     Socket socket)
    throws SocketException
{
    // Disable Nagle's algorithm (i.e., always send immediately).
    socket.setTcpNoDelay(true);
    if (keepAlive)
        socket.setKeepAlive(true);
}
 
Example #18
Source Project: jdk8u60   Author: chenghanpeng   File: DefaultSocketFactoryImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void setAcceptedSocketOptions(Acceptor acceptor,
                                     ServerSocket serverSocket,
                                     Socket socket)
    throws SocketException
{
    // Disable Nagle's algorithm (i.e., always send immediately).
    socket.setTcpNoDelay(true);
    if (keepAlive)
        socket.setKeepAlive(true);
}
 
Example #19
Source Project: jdk8u60   Author: chenghanpeng   File: CorbaInboundConnectionCacheImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public void put(Acceptor acceptor, Connection connection)
{
    if (orb.transportDebugFlag) {
        dprint(".put: " + acceptor + " " + connection);
    }
    synchronized (backingStore()) {
        connectionCache.add(connection);
        connection.setConnectionCache(this);
        dprintStatistics();
    }
}
 
Example #20
Source Project: openjdk-8-source   Author: keerath   File: CorbaTransportManagerImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public synchronized void registerAcceptor(Acceptor acceptor)
{
    if (orb.transportDebugFlag) {
        dprint(".registerAcceptor->: " + acceptor);
    }
    acceptors.add(acceptor);
    if (orb.transportDebugFlag) {
        dprint(".registerAcceptor<-: " + acceptor);
    }
}
 
Example #21
Source Project: jdk8u60   Author: chenghanpeng   File: ListenerThreadImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public ListenerThreadImpl(ORB orb, Acceptor acceptor, Selector selector)
{
    this.orb = orb;
    this.acceptor = acceptor;
    this.selector = selector;
    keepRunning = true;
}
 
Example #22
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: CorbaInboundConnectionCacheImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public CorbaInboundConnectionCacheImpl(ORB orb, Acceptor acceptor)
{
    super(orb, acceptor.getConnectionCacheType(),
          ((CorbaAcceptor)acceptor).getMonitoringName());
    this.connectionCache = new ArrayList();
    this.acceptor = acceptor;
    if (orb.transportDebugFlag) {
        dprint(": " + acceptor );
    }
}
 
Example #23
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: CorbaTransportManagerImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public synchronized void registerAcceptor(Acceptor acceptor)
{
    if (orb.transportDebugFlag) {
        dprint(".registerAcceptor->: " + acceptor);
    }
    acceptors.add(acceptor);
    if (orb.transportDebugFlag) {
        dprint(".registerAcceptor<-: " + acceptor);
    }
}
 
Example #24
Source Project: openjdk-8   Author: bpupadhyaya   File: SocketOrChannelConnectionImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public SocketOrChannelConnectionImpl(ORB orb,
                                     Acceptor acceptor,
                                     Socket socket,
                                     boolean useSelectThreadToWait,
                                     boolean useWorkerThread)
{
    this(orb, useSelectThreadToWait, useWorkerThread);

    this.socket = socket;
    socketChannel = socket.getChannel();
    if (socketChannel != null) {
        // REVISIT
        try {
            boolean isBlocking = !useSelectThreadToWait;
            socketChannel.configureBlocking(isBlocking);
        } catch (IOException e) {
            RuntimeException rte = new RuntimeException();
            rte.initCause(e);
            throw rte;
        }
    }
    this.acceptor = acceptor;

    serverRequestMap = Collections.synchronizedMap(new HashMap());
    isServer = true;

    state = ESTABLISHED;
}
 
Example #25
Source Project: openjdk-8-source   Author: keerath   File: ListenerThreadImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public ListenerThreadImpl(ORB orb, Acceptor acceptor, Selector selector)
{
    this.orb = orb;
    this.acceptor = acceptor;
    this.selector = selector;
    keepRunning = true;
}
 
Example #26
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: CorbaInboundConnectionCacheImpl.java    License: MIT License 5 votes vote down vote up
public CorbaInboundConnectionCacheImpl(ORB orb, Acceptor acceptor)
{
    super(orb, acceptor.getConnectionCacheType(),
          ((CorbaAcceptor)acceptor).getMonitoringName());
    this.connectionCache = new ArrayList();
    this.acceptor = acceptor;
    if (orb.transportDebugFlag) {
        dprint(": " + acceptor );
    }
}
 
Example #27
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: CorbaInboundConnectionCacheImpl.java    License: MIT License 5 votes vote down vote up
public void put(Acceptor acceptor, Connection connection)
{
    if (orb.transportDebugFlag) {
        dprint(".put: " + acceptor + " " + connection);
    }
    synchronized (backingStore()) {
        connectionCache.add(connection);
        connection.setConnectionCache(this);
        dprintStatistics();
    }
}
 
Example #28
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: ListenerThreadImpl.java    License: MIT License 5 votes vote down vote up
public ListenerThreadImpl(ORB orb, Acceptor acceptor, Selector selector)
{
    this.orb = orb;
    this.acceptor = acceptor;
    this.selector = selector;
    keepRunning = true;
}
 
Example #29
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ORBSocketFactory.java    License: Apache License 2.0 4 votes vote down vote up
public void setAcceptedSocketOptions(Acceptor acceptor,
                                 ServerSocket serverSocket,
                                 Socket socket)
throws SocketException;
 
Example #30
Source Project: hottub   Author: dsrg-uoft   File: CorbaInboundConnectionCacheImpl.java    License: GNU General Public License v2.0 4 votes vote down vote up
public Connection get(Acceptor acceptor)
{
    throw wrapper.methodShouldNotBeCalled();
}