Oracle Coherence for C++ API
Release 3.6.0.0

E15728-01

coherence/net/SocketAddress.hpp

00001 /*
00002 * SocketAddress.hpp
00003 *
00004 * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
00005 *
00006 * Oracle is a registered trademarks of Oracle Corporation and/or its
00007 * affiliates.
00008 *
00009 * This software is the confidential and proprietary information of Oracle
00010 * Corporation. You shall not disclose such confidential and proprietary
00011 * information and shall use it only in accordance with the terms of the
00012 * license agreement you entered into with Oracle.
00013 *
00014 * This notice may not be removed or altered.
00015 */
00016 #ifndef COH_SOCKET_ADDRESS_HPP
00017 #define COH_SOCKET_ADDRESS_HPP
00018 
00019 #include "coherence/lang.ns"
00020 
00021 #include <ostream>
00022 
00023 COH_OPEN_NAMESPACE2(coherence,net)
00024 
00025 
00026 /**
00027 * SocketAddress interface.
00028 *
00029 * @author mf  2008.03.21
00030 */
00031 class COH_EXPORT SocketAddress
00032     : public interface_spec<SocketAddress>
00033     {
00034     // ----- SocketAddress interface ----------------------------------------
00035 
00036     public:
00037         /**
00038         * Identify if the SocketAddress has been resolved.
00039         */
00040         virtual bool isUnresolved() const = 0;
00041 
00042         /**
00043         * Resolve the SocketAddress.
00044         *
00045         * If the address was already in a resolved state the returned address
00046         * may be the original address.
00047         *
00048         * @return a resolved SocketAddress
00049         *
00050         * @throws IOException upon resolution failure.
00051         */
00052         virtual SocketAddress::View resolve() const = 0;
00053     };
00054 
00055 COH_CLOSE_NAMESPACE2
00056 
00057 #endif // COH_SOCKET_ADDRESS_HPP
Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.