com.sun.corba.se.spi.legacy.connection.LegacyServerSocketEndPointInfo Java Examples

The following examples show how to use com.sun.corba.se.spi.legacy.connection.LegacyServerSocketEndPointInfo. 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: RepositoryImpl.java    License: Apache License 2.0 5 votes vote down vote up
public int registerServer(ServerDef serverDef)
    throws ServerAlreadyRegistered, BadServerDefinition
{
    // verify that the entry is valid
    LegacyServerSocketEndPointInfo endpoint =
        orb.getLegacyServerSocketManager()
            .legacyGetEndpoint(LegacyServerSocketEndPointInfo.BOOT_NAMING);
    int initSvcPort = ((SocketOrChannelAcceptor)endpoint)
        .getServerSocket().getLocalPort();
    ServerTableEntry entry = new ServerTableEntry( wrapper,
        illegalServerId, serverDef, (int) initSvcPort, "", true, debug );

    switch (entry.verify()) {
    case ServerMain.OK:
        break;
    case ServerMain.MAIN_CLASS_NOT_FOUND:
        throw new BadServerDefinition("main class not found.");
    case ServerMain.NO_MAIN_METHOD:
        throw new BadServerDefinition("no main method found.");
    case ServerMain.APPLICATION_ERROR:
        throw new BadServerDefinition("server application error.");
    default:
        throw new BadServerDefinition("unknown Exception.");
    }

    return registerServer(serverDef, illegalServerId);
}
 
Example #2
Source Project: hottub   Author: dsrg-uoft   File: LegacyServerSocketManagerImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public synchronized LegacyServerSocketEndPointInfo legacyGetEndpoint(
    String name)
{
    Iterator iterator = getAcceptorIterator();
    while (iterator.hasNext()) {
        LegacyServerSocketEndPointInfo endPoint = cast(iterator.next());
        if (endPoint != null && name.equals(endPoint.getName())) {
            return endPoint;
        }
    }
    throw new INTERNAL("No acceptor for: " + name);
}
 
Example #3
Source Project: openjdk-8   Author: bpupadhyaya   File: LegacyServerSocketManagerImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
private LegacyServerSocketEndPointInfo cast(Object o)
{
    if (o instanceof LegacyServerSocketEndPointInfo) {
        return (LegacyServerSocketEndPointInfo) o;
    }
    return null;
}
 
Example #4
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: LegacyServerSocketManagerImpl.java    License: Apache License 2.0 5 votes vote down vote up
public boolean legacyIsLocalServerPort(int port)
{
    Iterator iterator = getAcceptorIterator();
    while (iterator.hasNext()) {
        LegacyServerSocketEndPointInfo endPoint = cast(iterator.next());
        if (endPoint != null && endPoint.getPort() == port) {
            return true;
        }
    }
    return false;
}
 
Example #5
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: LegacyServerSocketManagerImpl.java    License: Apache License 2.0 5 votes vote down vote up
private int legacyGetServerPort (String socketType, boolean isPersistent)
{
    Iterator endpoints = getAcceptorIterator();
    while (endpoints.hasNext()) {
        LegacyServerSocketEndPointInfo ep = cast(endpoints.next());
        if (ep != null && ep.getType().equals(socketType)) {
            if (isPersistent) {
                return ep.getLocatorPort();
            } else {
                return ep.getPort();
            }
        }
    }
    return -1;
}
 
Example #6
Source Project: openjdk-8   Author: bpupadhyaya   File: EndPointInfoImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public EndPointInfoImpl(String type, int port, String hostname) {
    this.type = type;
    this.port = port;
    this.hostname = hostname;
    this.locatorPort = -1;
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
}
 
Example #7
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: EndPointInfoImpl.java    License: Apache License 2.0 5 votes vote down vote up
public EndPointInfoImpl(String type, int port, String hostname) {
    this.type = type;
    this.port = port;
    this.hostname = hostname;
    this.locatorPort = -1;
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
}
 
Example #8
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: SocketOrChannelAcceptorImpl.java    License: Apache License 2.0 5 votes vote down vote up
public SocketOrChannelAcceptorImpl(ORB orb)
{
    this.orb = orb;
    wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_TRANSPORT ) ;

    setWork(this);
    initialized = false;

    // BEGIN Legacy support.
    this.hostname = orb.getORBData().getORBServerHost();
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
    this.locatorPort = -1;
    // END Legacy support.
}
 
Example #9
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: SocketOrChannelAcceptorImpl.java    License: Apache License 2.0 5 votes vote down vote up
public String getName()
{
    // Kluge alert:
    // Work and Legacy both define getName.
    // Try to make this behave best for most cases.
    String result =
        name.equals(LegacyServerSocketEndPointInfo.NO_NAME) ?
        this.toString() : name;
    return result;
}
 
Example #10
Source Project: hottub   Author: dsrg-uoft   File: SocketOrChannelAcceptorImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public String getName()
{
    // Kluge alert:
    // Work and Legacy both define getName.
    // Try to make this behave best for most cases.
    String result =
        name.equals(LegacyServerSocketEndPointInfo.NO_NAME) ?
        this.toString() : name;
    return result;
}
 
Example #11
Source Project: TencentKona-8   Author: Tencent   File: RepositoryImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public int registerServer(ServerDef serverDef)
    throws ServerAlreadyRegistered, BadServerDefinition
{
    // verify that the entry is valid
    LegacyServerSocketEndPointInfo endpoint =
        orb.getLegacyServerSocketManager()
            .legacyGetEndpoint(LegacyServerSocketEndPointInfo.BOOT_NAMING);
    int initSvcPort = ((SocketOrChannelAcceptor)endpoint)
        .getServerSocket().getLocalPort();
    ServerTableEntry entry = new ServerTableEntry( wrapper,
        illegalServerId, serverDef, (int) initSvcPort, "", true, debug );

    switch (entry.verify()) {
    case ServerMain.OK:
        break;
    case ServerMain.MAIN_CLASS_NOT_FOUND:
        throw new BadServerDefinition("main class not found.");
    case ServerMain.NO_MAIN_METHOD:
        throw new BadServerDefinition("no main method found.");
    case ServerMain.APPLICATION_ERROR:
        throw new BadServerDefinition("server application error.");
    default:
        throw new BadServerDefinition("unknown Exception.");
    }

    return registerServer(serverDef, illegalServerId);
}
 
Example #12
Source Project: TencentKona-8   Author: Tencent   File: LegacyServerSocketManagerImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public synchronized LegacyServerSocketEndPointInfo legacyGetEndpoint(
    String name)
{
    Iterator iterator = getAcceptorIterator();
    while (iterator.hasNext()) {
        LegacyServerSocketEndPointInfo endPoint = cast(iterator.next());
        if (endPoint != null && name.equals(endPoint.getName())) {
            return endPoint;
        }
    }
    throw new INTERNAL("No acceptor for: " + name);
}
 
Example #13
Source Project: TencentKona-8   Author: Tencent   File: LegacyServerSocketManagerImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public boolean legacyIsLocalServerPort(int port)
{
    Iterator iterator = getAcceptorIterator();
    while (iterator.hasNext()) {
        LegacyServerSocketEndPointInfo endPoint = cast(iterator.next());
        if (endPoint != null && endPoint.getPort() == port) {
            return true;
        }
    }
    return false;
}
 
Example #14
Source Project: TencentKona-8   Author: Tencent   File: LegacyServerSocketManagerImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
private int legacyGetServerPort (String socketType, boolean isPersistent)
{
    Iterator endpoints = getAcceptorIterator();
    while (endpoints.hasNext()) {
        LegacyServerSocketEndPointInfo ep = cast(endpoints.next());
        if (ep != null && ep.getType().equals(socketType)) {
            if (isPersistent) {
                return ep.getLocatorPort();
            } else {
                return ep.getPort();
            }
        }
    }
    return -1;
}
 
Example #15
Source Project: TencentKona-8   Author: Tencent   File: LegacyServerSocketManagerImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
private LegacyServerSocketEndPointInfo cast(Object o)
{
    if (o instanceof LegacyServerSocketEndPointInfo) {
        return (LegacyServerSocketEndPointInfo) o;
    }
    return null;
}
 
Example #16
Source Project: TencentKona-8   Author: Tencent   File: EndPointInfoImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public EndPointInfoImpl(String type, int port, String hostname) {
    this.type = type;
    this.port = port;
    this.hostname = hostname;
    this.locatorPort = -1;
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
}
 
Example #17
Source Project: TencentKona-8   Author: Tencent   File: SocketOrChannelAcceptorImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public SocketOrChannelAcceptorImpl(ORB orb)
{
    this.orb = orb;
    wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_TRANSPORT ) ;

    setWork(this);
    initialized = false;

    // BEGIN Legacy support.
    this.hostname = orb.getORBData().getORBServerHost();
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
    this.locatorPort = -1;
    // END Legacy support.
}
 
Example #18
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: EndPointInfoImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public EndPointInfoImpl(String type, int port, String hostname) {
    this.type = type;
    this.port = port;
    this.hostname = hostname;
    this.locatorPort = -1;
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
}
 
Example #19
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: LegacyServerSocketManagerImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
private int legacyGetServerPort (String socketType, boolean isPersistent)
{
    Iterator endpoints = getAcceptorIterator();
    while (endpoints.hasNext()) {
        LegacyServerSocketEndPointInfo ep = cast(endpoints.next());
        if (ep != null && ep.getType().equals(socketType)) {
            if (isPersistent) {
                return ep.getLocatorPort();
            } else {
                return ep.getPort();
            }
        }
    }
    return -1;
}
 
Example #20
Source Project: hottub   Author: dsrg-uoft   File: LegacyServerSocketManagerImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public boolean legacyIsLocalServerPort(int port)
{
    Iterator iterator = getAcceptorIterator();
    while (iterator.hasNext()) {
        LegacyServerSocketEndPointInfo endPoint = cast(iterator.next());
        if (endPoint != null && endPoint.getPort() == port) {
            return true;
        }
    }
    return false;
}
 
Example #21
Source Project: jdk8u60   Author: chenghanpeng   File: LegacyServerSocketManagerImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public synchronized LegacyServerSocketEndPointInfo legacyGetEndpoint(
    String name)
{
    Iterator iterator = getAcceptorIterator();
    while (iterator.hasNext()) {
        LegacyServerSocketEndPointInfo endPoint = cast(iterator.next());
        if (endPoint != null && name.equals(endPoint.getName())) {
            return endPoint;
        }
    }
    throw new INTERNAL("No acceptor for: " + name);
}
 
Example #22
Source Project: hottub   Author: dsrg-uoft   File: LegacyServerSocketManagerImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
private LegacyServerSocketEndPointInfo cast(Object o)
{
    if (o instanceof LegacyServerSocketEndPointInfo) {
        return (LegacyServerSocketEndPointInfo) o;
    }
    return null;
}
 
Example #23
Source Project: jdk8u60   Author: chenghanpeng   File: LegacyServerSocketManagerImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
private int legacyGetServerPort (String socketType, boolean isPersistent)
{
    Iterator endpoints = getAcceptorIterator();
    while (endpoints.hasNext()) {
        LegacyServerSocketEndPointInfo ep = cast(endpoints.next());
        if (ep != null && ep.getType().equals(socketType)) {
            if (isPersistent) {
                return ep.getLocatorPort();
            } else {
                return ep.getPort();
            }
        }
    }
    return -1;
}
 
Example #24
Source Project: jdk8u60   Author: chenghanpeng   File: LegacyServerSocketManagerImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
private LegacyServerSocketEndPointInfo cast(Object o)
{
    if (o instanceof LegacyServerSocketEndPointInfo) {
        return (LegacyServerSocketEndPointInfo) o;
    }
    return null;
}
 
Example #25
Source Project: jdk8u60   Author: chenghanpeng   File: EndPointInfoImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public EndPointInfoImpl(String type, int port, String hostname) {
    this.type = type;
    this.port = port;
    this.hostname = hostname;
    this.locatorPort = -1;
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
}
 
Example #26
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: SocketOrChannelAcceptorImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public SocketOrChannelAcceptorImpl(ORB orb)
{
    this.orb = orb;
    wrapper = ORBUtilSystemException.get( orb,
        CORBALogDomains.RPC_TRANSPORT ) ;

    setWork(this);
    initialized = false;

    // BEGIN Legacy support.
    this.hostname = orb.getORBData().getORBServerHost();
    this.name = LegacyServerSocketEndPointInfo.NO_NAME;
    this.locatorPort = -1;
    // END Legacy support.
}
 
Example #27
Source Project: openjdk-8-source   Author: keerath   File: LegacyServerSocketManagerImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
private LegacyServerSocketEndPointInfo cast(Object o)
{
    if (o instanceof LegacyServerSocketEndPointInfo) {
        return (LegacyServerSocketEndPointInfo) o;
    }
    return null;
}
 
Example #28
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: LegacyServerSocketManagerImpl.java    License: MIT License 5 votes vote down vote up
public synchronized LegacyServerSocketEndPointInfo legacyGetEndpoint(
    String name)
{
    Iterator iterator = getAcceptorIterator();
    while (iterator.hasNext()) {
        LegacyServerSocketEndPointInfo endPoint = cast(iterator.next());
        if (endPoint != null && name.equals(endPoint.getName())) {
            return endPoint;
        }
    }
    throw new INTERNAL("No acceptor for: " + name);
}
 
Example #29
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: LegacyServerSocketManagerImpl.java    License: MIT License 5 votes vote down vote up
private int legacyGetServerPort (String socketType, boolean isPersistent)
{
    Iterator endpoints = getAcceptorIterator();
    while (endpoints.hasNext()) {
        LegacyServerSocketEndPointInfo ep = cast(endpoints.next());
        if (ep != null && ep.getType().equals(socketType)) {
            if (isPersistent) {
                return ep.getLocatorPort();
            } else {
                return ep.getPort();
            }
        }
    }
    return -1;
}
 
Example #30
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: LegacyServerSocketManagerImpl.java    License: MIT License 5 votes vote down vote up
private LegacyServerSocketEndPointInfo cast(Object o)
{
    if (o instanceof LegacyServerSocketEndPointInfo) {
        return (LegacyServerSocketEndPointInfo) o;
    }
    return null;
}