00001
00002
00003
00004
00005
00006
00007 #ifndef COH_SINGLE_ADDRESS_PROVIDER_HPP
00008 #define COH_SINGLE_ADDRESS_PROVIDER_HPP
00009
00010 #include "coherence/lang.ns"
00011
00012 #include "coherence/net/AddressProvider.hpp"
00013
00014 COH_OPEN_NAMESPACE2(coherence,net)
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 class COH_EXPORT SingleAddressProvider
00025 : public class_spec<SingleAddressProvider,
00026 extends<Object>,
00027 implements<AddressProvider> >
00028 {
00029 friend class factory<SingleAddressProvider>;
00030
00031
00032
00033 protected:
00034
00035
00036
00037
00038
00039
00040 SingleAddressProvider(InetSocketAddress::View address);
00041
00042
00043
00044 public:
00045
00046
00047
00048 virtual void accept();
00049
00050
00051
00052
00053 virtual InetSocketAddress::View getNextAddress();
00054
00055
00056
00057
00058 virtual void reject(Exception::Holder oheCause);
00059
00060
00061
00062 public:
00063
00064
00065
00066 virtual TypedHandle<const String> toString() const;
00067
00068
00069
00070 protected:
00071
00072
00073
00074 MemberView<InetSocketAddress> m_vAddress;
00075
00076
00077
00078
00079 bool m_fAddressGiven;
00080 };
00081
00082 COH_CLOSE_NAMESPACE2
00083
00084 #endif // COH_SINGLE_ADDRESS_PROVIDER_HPP
00085