Package org.jclouds.internal
Class BaseView
java.lang.Object
com.google.common.collect.ForwardingObject
org.jclouds.internal.BaseView
- All Implemented Interfaces:
View
- Direct Known Subclasses:
BlobStoreContextImpl,ComputeServiceContextImpl,LoadBalancerServiceContextImpl,RegionScopedBlobStoreContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Contextdelegate()booleancom.google.common.reflect.TypeToken<? extends Context> inthashCode()protected com.google.common.base.MoreObjects.ToStringHelperstring()toString()<C extends Context>
Cunwrap()shortcut forunwrap(getWrappedType())<C extends Context>
Cunwrap(com.google.common.reflect.TypeToken<C> type) Return an object of the specified type to allow access to the backend context.<A extends Closeable>
AUnwraps the underlying api from this view.
-
Constructor Details
-
BaseView
-
-
Method Details
-
unwrap
Description copied from interface:ViewReturn an object of the specified type to allow access to the backend context. If the backend context is not assignable from the supplied type, anIllegalArgumentExceptionis thrown. ex.ApiContext
backendApi = computeContext.unwrap(new TypeTokeninvalid input: '<'ApiContext >(){}); -
getBackendType
- Specified by:
getBackendTypein interfaceView- Returns:
- type of the context powering the current one.
-
unwrap
Description copied from interface:Viewshortcut forunwrap(getWrappedType())- Specified by:
unwrapin interfaceView- Throws:
ClassCastException- if the user suppliedCparam is not assignableFromView.getBackendType()
-
unwrapApi
Description copied from interface:ViewUnwraps the underlying api from this view. -
delegate
- Specified by:
delegatein classcom.google.common.collect.ForwardingObject
-
equals
-
hashCode
public int hashCode() -
toString
- Overrides:
toStringin classcom.google.common.collect.ForwardingObject
-
string
protected com.google.common.base.MoreObjects.ToStringHelper string()
-